timingwheel

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Tick          time.Duration `yaml:"tick"`
	WheelSize     int64         `yaml:"wheel_size"`
	Layers        int64         `yaml:"layers"`
	KeyPrefix     string        `yaml:"key_prefix"`
	EtcdEndpoints []string      `yaml:"etcd"`
	CtrlEndpoints []string      `yaml:"controllers"`
}

type Manager

type Manager interface {
	Init(ctx context.Context) error
	Start(ctx context.Context) error
	Push(ctx context.Context, e *ce.Event) bool
	SetLeader(isleader bool)
	IsLeader() bool
	IsDeployed(ctx context.Context) bool
	Recover(ctx context.Context) error
	StopNotify() <-chan struct{}
	Stop(ctx context.Context)
}

func NewTimingWheel

func NewTimingWheel(c *Config) Manager

Jump to

Keyboard shortcuts

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