types

package
v0.0.0-...-d8d46aa Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindRequest

type BindRequest struct {
	RoutingKey string

	// Standard options for Binding Option
	NoWait bool

	// Custom headers for binding adjustment
	Arguments Table // map[string]interface{}
}

type CommitRequest

type CommitRequest struct {
	// Queue to send to, exclusive to Exchange + RoutingKey
	Queue *QueueRequest

	// Exchange to publish to, exclusive to Queue
	Exchange   *ExchangeRequest
	RoutingKey string

	// Embedding Payload
	*Payload

	// Embedding ReplyAddr
	*ReplyAddr
}

func (*CommitRequest) Add

func (r *CommitRequest) Add(key string, val interface{}) *CommitRequest

func (*CommitRequest) ContentEncoding

func (r *CommitRequest) ContentEncoding(val string) *CommitRequest

func (*CommitRequest) ContentType

func (r *CommitRequest) ContentType(val string) *CommitRequest

func (*CommitRequest) CorrelationId

func (r *CommitRequest) CorrelationId(val string) *CommitRequest

func (*CommitRequest) Deadline

func (r *CommitRequest) Deadline() bool

func (*CommitRequest) Incoming

func (r *CommitRequest) Incoming() chan<- *Payload

func (*CommitRequest) Reply

func (r *CommitRequest) Reply() <-chan *Payload

func (*CommitRequest) ReplyTo

func (r *CommitRequest) ReplyTo(val string) *CommitRequest

func (*CommitRequest) RequestId

func (r *CommitRequest) RequestId() string

func (*CommitRequest) SetExchange

func (r *CommitRequest) SetExchange(exchange string) *CommitRequest

func (*CommitRequest) SetQueue

func (r *CommitRequest) SetQueue(name string) *CommitRequest

func (*CommitRequest) SetRoutingKey

func (r *CommitRequest) SetRoutingKey(key string) *CommitRequest

func (*CommitRequest) Timeout

func (r *CommitRequest) Timeout() <-chan struct{}

type ExchangeRequest

type ExchangeRequest struct {
	// Name and kind of exchange for ExchangeDeclare
	Name string
	Kind string

	// Standard options for Exchange
	Durable    bool
	AutoDelete bool
	Internal   bool
	NoWait     bool

	// Custom headers for exchange adjustment
	Arguments Table // map[string]interface{}
}

type MessageRpc

type MessageRpc struct {

	// Embedding Payload
	*Payload
	// contains filtered or unexported fields
}

func NewMessageRpc

func NewMessageRpc(acknowledger Acknowledger, tag uint64, payload *Payload) *MessageRpc

func (*MessageRpc) Ack

func (m *MessageRpc) Ack(multiple bool) error

func (*MessageRpc) CorrelationId

func (m *MessageRpc) CorrelationId() string

func (*MessageRpc) Nack

func (m *MessageRpc) Nack(multiple, requeue bool) error

func (*MessageRpc) Reject

func (m *MessageRpc) Reject(requeue bool) error

func (*MessageRpc) ReplyTo

func (m *MessageRpc) ReplyTo() string

func (*MessageRpc) RequestId

func (m *MessageRpc) RequestId() string

type Payload

type Payload struct {
	Headers         Table
	ContentType     string
	ContentEncoding string
	CorrelationId   string
	ReplyTo         string
	Content         *Message
}

func NewPayload

func NewPayload(contentType string, content *Message) *Payload

func (*Payload) NewReader

func (p *Payload) NewReader() *bytes.Reader

type QueueRequest

type QueueRequest struct {
	// Name of queue for QueueDeclare
	Name string

	// Standard options for Queue
	Durable    bool
	AutoDelete bool
	Exclusive  bool
	NoWait     bool

	// Custom headers for queue adjustment
	Arguments Table // map[string]interface{}
}

type ReplyAddr

type ReplyAddr struct {
	RequestId string

	Context context.Context
	Reply   chan *Payload
}

func NewReplyAddr

func NewReplyAddr(requestId string, ctx context.Context) *ReplyAddr

type SubscriptionRequest

type SubscriptionRequest struct {
	// Queue to subscribe, must provide this value
	Queue *QueueRequest

	// Exchange to declare or initialize
	Exchange *ExchangeRequest

	// Bind Queue -> Exchange by Routing Keys
	Binding []*BindRequest

	// Standard options for subscription
	AutoAck   bool
	Exclusive bool
	NoLocal   bool
	NoWait    bool

	// Custom headers for queue subscription
	Arguments Table // map[string]interface{}
}

Jump to

Keyboard shortcuts

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