timer

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(c *Config)

Types

type Config

type Config struct {
	Name                 string               `yaml:"name"`
	IP                   string               `yaml:"ip"`
	Port                 int                  `yaml:"port"`
	Replicas             uint                 `yaml:"replicas"`
	EtcdEndpoints        []string             `yaml:"etcd"`
	CtrlEndpoints        []string             `yaml:"controllers"`
	MetadataConfig       MetadataConfig       `yaml:"metadata"`
	LeaderElectionConfig LeaderElectionConfig `yaml:"leader_election"`
	TimingWheelConfig    TimingWheelConfig    `yaml:"timingwheel"`
	Observability        observability.Config `yaml:"observability"`
}

func InitConfig

func InitConfig(filename string) (*Config, error)

func (*Config) GetLeaderElectionConfig

func (c *Config) GetLeaderElectionConfig() *leaderelection.Config

func (*Config) GetTimingWheelConfig

func (c *Config) GetTimingWheelConfig() *timingwheel.Config

type LeaderElectionConfig

type LeaderElectionConfig struct {
	LeaseDuration int64 `yaml:"lease_duration"`
}

type MetadataConfig

type MetadataConfig struct {
	KeyPrefix string `yaml:"key_prefix"`
}

type TimingWheelConfig

type TimingWheelConfig struct {
	Tick      int64 `yaml:"tick"`
	WheelSize int64 `yaml:"wheel_size"`
	Layers    int64 `yaml:"layers"`
}

Directories

Path Synopsis
Package leaderelection is a generated GoMock package.
Package leaderelection is a generated GoMock package.

Jump to

Keyboard shortcuts

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