v2

package module
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message interface {
	Ack() error
	Nack() error
	Reject() error

	ID() uuid.UUID

	CorrelationID() uuid.UUID
	SetCorrelationID(id uuid.UUID) Message

	Headers() map[string]interface{}
	SetHeaders(headers map[string]interface{}) Message
	GetHeader(key string) interface{}
	SetHeader(key string, value interface{}) Message

	ContentType() string
	SetContentType(v string) Message

	ContentEncoding() string
	SetContentEncoding(v string) Message

	Body() []byte
	SetBody(body []byte) Message

	DeliveryMode() uint8
	SetDeliveryModePersistent() Message

	Priority() uint8
	SetPriority(priority uint8) Message

	ReplyTo() string
	SetReplyTo(v string) Message

	Expiration() time.Duration
	SetExpiration(expiration time.Duration) Message

	Type() string
	SetType(v string) Message

	UserID() string
	SetUserID(useID string) Message

	AppID() string
	SetAppID(appID string) Message

	Timestamp() time.Time
	SetTimestamp(timestamp time.Time) Message
}

type Publisher

type Publisher interface {
	Publish(message Message, topic string, routingKey ...string) error
}

type Subscriber

type Subscriber interface {
	Subscribe(handler func(message Message))
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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