mns

package module
v0.0.0-...-bea4e8e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2015 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mns

ali-mns reader, writer and sender

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataTypeIsNotStruct      = errors.New("payload data type is not a struct")
	ErrDataTypeCouldNotBeDecode = errors.New("payload data type could not be decode")
)
View Source
var (
	ErrAliMNSQueueIsEmpty        = errors.New("ali-mns queue is empty")
	ErrAliURLIsEmpty             = errors.New("ali-mns url is empty")
	ErrAliAccessKeyIdIsEmpty     = errors.New("ali-mns access_key_id is empty")
	ErrAliAccessKeySecretIsEmpty = errors.New("ali-mns access_key_secret is empty")

	ErrAliMNSResponseError = errors.New("ali-mns response error")
)
View Source
var (
	ErrMNSWriteMessageError = errors.New("ali-mns write message error")
)

Functions

func NewMNSEncodingComponent

func NewMNSEncodingComponent(config spirit.Map) (component spirit.Component, err error)

func NewMNSReader

func NewMNSReader(config spirit.Map) (r io.ReadCloser, err error)

func NewMNSSender

func NewMNSSender(config spirit.Map) (sender spirit.Sender, err error)

func NewMNSWriter

func NewMNSWriter(config spirit.Map) (w io.WriteCloser, err error)

Types

type MNSEncodingComponent

type MNSEncodingComponent struct {
	// contains filtered or unexported fields
}

func (*MNSEncodingComponent) Decode

func (p *MNSEncodingComponent) Decode(payload spirit.Payload) (result interface{}, err error)

func (*MNSEncodingComponent) Encode

func (p *MNSEncodingComponent) Encode(payload spirit.Payload) (result interface{}, err error)

func (*MNSEncodingComponent) Handlers

func (p *MNSEncodingComponent) Handlers() spirit.Handlers

func (*MNSEncodingComponent) Labels

func (p *MNSEncodingComponent) Labels() spirit.Labels

func (*MNSEncodingComponent) URN

func (p *MNSEncodingComponent) URN() string

type MNSEncodingComponentConfig

type MNSEncodingComponentConfig struct {
	SingleMessage bool `json:"single_message"`
}

type MNSFlowMetadata

type MNSFlowMetadata struct {
	CurrentFlowId int      `json:"current_flow_id"`
	Error         []string `json:"error"`
	Normal        []string `json:"normal"`
}

type MNSParallelFlowMetadata

type MNSParallelFlowMetadata struct {
	Id    string `json:"id"`
	Index int    `json:"index"`
	Count int    `json:"count"`
}

type MNSReader

type MNSReader struct {
	// contains filtered or unexported fields
}

func (*MNSReader) Close

func (p *MNSReader) Close() (err error)

func (*MNSReader) Read

func (p *MNSReader) Read(data []byte) (n int, err error)

type MNSReaderConfig

type MNSReaderConfig struct {
	URL                string `json:"url"`
	AccessKeyId        string `json:"access_key_id"`
	AccessKeySecret    string `json:"access_key_secret"`
	Queue              string `json:"queue"`
	PollingWaitSeconds int    `json:"polling_wait_seconds"`
	MaxReadCount       int    `json:"max_read_count"`
	ProxyAddress       string `json:"proxy_address"`
}

type MNSSender

type MNSSender struct {
	// contains filtered or unexported fields
}

func (*MNSSender) SetDeliveryGetter

func (p *MNSSender) SetDeliveryGetter(getter spirit.DeliveryGetter) (err error)

func (*MNSSender) SetTranslator

func (p *MNSSender) SetTranslator(translator spirit.OutputTranslator) (err error)

func (*MNSSender) Start

func (p *MNSSender) Start() (err error)

func (*MNSSender) Status

func (p *MNSSender) Status() spirit.Status

func (*MNSSender) Stop

func (p *MNSSender) Stop() (err error)

type MNSSenderConfig

type MNSSenderConfig struct {
	URL             string `json:"url"`
	AccessKeyId     string `json:"access_key_id"`
	AccessKeySecret string `json:"access_key_secret"`
	DelaySeconds    int    `json:"delay_seconds"`
	Priority        int    `json:"priority"`
	ProxyAddress    string `json:"proxy_address"`
}

type MNSWriter

type MNSWriter struct {
	// contains filtered or unexported fields
}

func (*MNSWriter) Close

func (p *MNSWriter) Close() (err error)

func (*MNSWriter) Write

func (p *MNSWriter) Write(data []byte) (n int, err error)

type MNSWriterConfig

type MNSWriterConfig struct {
	URL             string `json:"url"`
	AccessKeyId     string `json:"access_key_id"`
	AccessKeySecret string `json:"access_key_secret"`
	Queue           string `json:"queue"`
	DelaySeconds    int    `json:"delay_seconds"`
	Priority        int    `json:"priority"`
	ProxyAddress    string `json:"proxy_address"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址