Help us shape the future of Go! Take the 2026 Go Developer Survey

busext

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout  = errors.New("Timeout when push bus messages")
	ErrNotReady = errors.New("BusExt is not ready")
)

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

	ErrorLogger customLoggerInterface
	// 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)

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