broker

package
v0.0.0-...-d3f65ed Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegisteredTask

func NewRegisteredTask() *registeredTask

NewRegisteredTask 初始化任务注册器

func SetRetry

func SetRetry(retry bool) options.Option

func SetRetryFn

func SetRetryFn(fn func(ctx context.Context)) options.Option

Types

type Broker

type Broker struct {
	// contains filtered or unexported fields
}

Broker Broker

func NewBroker

func NewBroker(r *registeredTask, ctx context.Context, options ...options.Option) *Broker

NewBroker 初始化 Broker

func (*Broker) GetRetry

func (b *Broker) GetRetry() bool

func (*Broker) GetRetryCtx

func (b *Broker) GetRetryCtx() context.Context

func (*Broker) GetRetryFn

func (b *Broker) GetRetryFn() func(ctx context.Context)

func (*Broker) GetStopCtx

func (b *Broker) GetStopCtx() context.Context

func (Broker) IsRegister

func (r Broker) IsRegister(taskName string) bool

IsRegister 是否注册

func (Broker) Quit

func (r Broker) Quit(taskName string)

Quit 注销

func (Broker) Register

func (r Broker) Register(taskName string)

Register 注册

func (Broker) RegisterList

func (r Broker) RegisterList(taskNameList ...string)

RegisterList 注册

func (*Broker) StopConsuming

func (b *Broker) StopConsuming()

Jump to

Keyboard shortcuts

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