schedulerdiscovery

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeFlagName = "query-scheduler.service-discovery-mode"

	ModeDNS  = "dns"
	ModeRing = "ring"
)

Variables

This section is empty.

Functions

func New

func New(cfg Config, schedulerAddress string, lookupPeriod time.Duration, component string, receiver servicediscovery.Notifications, logger log.Logger, reg prometheus.Registerer) (services.Service, error)

func NewRingClient

func NewRingClient(cfg util.CommonRingConfig, component string, logger log.Logger, reg prometheus.Registerer) (*ring.Ring, error)

NewRingClient creates a client for the query-schedulers ring.

func NewRingLifecycler

func NewRingLifecycler(cfg util.CommonRingConfig, logger log.Logger, reg prometheus.Registerer) (*ring.BasicLifecycler, error)

NewRingLifecycler creates a new query-scheduler ring lifecycler with all required lifecycler delegates.

Types

type Config

type Config struct {
	Mode             string                `yaml:"service_discovery_mode" category:"experimental" doc:"hidden"`
	SchedulerRing    util.CommonRingConfig `yaml:"ring" doc:"hidden"`
	MaxUsedInstances int                   `yaml:"max_used_instances" category:"experimental"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger)

func (*Config) Validate

func (cfg *Config) Validate() error

Jump to

Keyboard shortcuts

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