eventbus

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWorkers        = 5
	DefaultBatchSize      = 100
	DefaultSyncPeriod     = time.Second * 30
	DefaultMaxRetries     = 10
	DefaultDequeueTimeout = time.Minute * 5
	DefaultRunningTimeout = time.Hour * 24 * 365 // 1year
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	MaxRetries     int           `json:"maxRetries" mapstructure:"maxRetries"`
	SyncPeriod     time.Duration `json:"syncPeriod" mapstructure:"syncPeriod"`
	BatchSize      int           `json:"batchSize" mapstructure:"batchSize"`
	Workers        int           `json:"workers" mapstructure:"workers"`
	DequeueTimeout time.Duration `json:"dequeueTimeout" mapstructure:"dequeueTimeout"`
	RunningTimeout time.Duration `json:"runningTimeout" mapstructure:"runningTimeout"`
}

func NewOptions

func NewOptions() *Options

NewOptions new an event bus option.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags add event bus flags

func (*Options) Enabled

func (o *Options) Enabled() bool

Enabled check if event bus is enabled

func (*Options) Validate

func (o *Options) Validate() error

Validate validate log options is valid.

Jump to

Keyboard shortcuts

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