busext

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMsg

func BuildMsg(routingKey string, args []interface{}, kwargs map[string]interface{}) (*amqp.Publishing, error)

Types

type Body

type Body struct {
	Args   []interface{}          `json:"args"`
	Kwargs map[string]interface{} `json:"kwargs"`
	Embed  Embed
}

type BusExt

type BusExt struct {
	NS string
	// contains filtered or unexported fields
}

func (*BusExt) Application

func (b *BusExt) Application() *gobay.Application

func (*BusExt) Close

func (b *BusExt) Close() error

func (*BusExt) Consume

func (b *BusExt) Consume() error

func (*BusExt) Init

func (b *BusExt) Init(app *gobay.Application) error

func (*BusExt) Object

func (b *BusExt) Object() interface{}

func (*BusExt) Push

func (b *BusExt) Push(exchange, routingKey string, data amqp.Publishing) error

func (*BusExt) Register

func (b *BusExt) Register(routingKey string, handler Handler)

func (*BusExt) UnsafePush

func (b *BusExt) UnsafePush(exchange, routingKey string, data amqp.Publishing) error

type Embed

type Embed struct {
	Callbacks []string `json:"callbacks"`
	Errbacks  []string `json:"errbacks"`
	Chain     []string `json:"chain"`
	Chord     string   `json:"chord"`
}

type Handler

type Handler interface {
	ParsePayload(args []byte, kwargs []byte) error

	Run() error
}

Jump to

Keyboard shortcuts

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