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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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