Documentation ¶
Index ¶
- type Broker
- func (b *Broker) Cancel()
- func (b *Broker) Close() error
- func (b *Broker) Ctx() context.Context
- func (b *Broker) Finish()
- func (b *Broker) Middleware(mws ...middleware.Middleware)
- func (b *Broker) Register(name string, handler bee.Handler, opts ...bee.Option)
- func (b *Broker) Router(name string) (handler bee.Handler, ok bool)
- func (b *Broker) Send(ctx context.Context, name string, data interface{}) error
- func (b *Broker) SendDelay(ctx context.Context, name string, body interface{}, delay time.Duration) error
- func (b *Broker) Worker() error
- type IBroker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
func (*Broker) Middleware ¶
func (b *Broker) Middleware(mws ...middleware.Middleware)
type IBroker ¶
type IBroker interface { // Register Registration handler function Register(name string, handler bee.Handler, opts ...bee.Option) // Middleware Registers the middleware of the handler function Middleware(mws ...middleware.Middleware) // Worker Start consumer workers Worker() error // Close broker Close() error // Send Produce the message to execute the handler function asynchronously Send(ctx context.Context, name string, value interface{}) error // SendDelay Produce the delay message to execute the handler function asynchronously SendDelay(ctx context.Context, name string, value interface{}, delay time.Duration) error }
Click to show internal directories.
Click to hide internal directories.