Documentation ¶
Index ¶
- func GetActive(ctx context.Context) bool
- func GetConnect(ctx context.Context) interface{}
- func GetConsume(ctx context.Context, channel interface{}) (interface{}, error)
- func GetTopic(ctx context.Context, key string) string
- func InitMessenger(name string, opt MenssengerOption)
- func Sent(ctx context.Context, payload SentPayload) error
- type MenssengerOption
- type Messenger
- type Rabbit
- func (c *Rabbit) GetActive(ctx context.Context) bool
- func (c *Rabbit) GetConnect(ctx context.Context) interface{}
- func (c *Rabbit) GetConsume(ctx context.Context, channel interface{}) (interface{}, error)
- func (c *Rabbit) GetTopic(ctx context.Context, key string) string
- func (c *Rabbit) Sent(ctx context.Context, payload SentPayload) error
- type SentPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConnect ¶
func GetConsume ¶
func InitMessenger ¶ added in v0.0.3
func InitMessenger(name string, opt MenssengerOption)
Types ¶
type MenssengerOption ¶
type Messenger ¶
type Messenger interface { Sent(ctx context.Context, payload SentPayload) error GetConnect(ctx context.Context) interface{} GetTopic(ctx context.Context, key string) string GetConsume(ctx context.Context, channel interface{}) (interface{}, error) GetActive(ctx context.Context) bool }
func NewRabbit ¶
func NewRabbit(opt MenssengerOption) Messenger
type Rabbit ¶
type Rabbit struct { Connect *amqp.Connection Topics map[string]string Active bool Qos int Channel *amqp.Channel // contains filtered or unexported fields }
func (*Rabbit) GetConnect ¶
func (*Rabbit) GetConsume ¶
type SentPayload ¶
Click to show internal directories.
Click to hide internal directories.