scheduler

package
v0.0.0-...-018535d Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockBuilderScheduler

type BlockBuilderScheduler struct {
	services.Service
	// contains filtered or unexported fields
}

func New

func New(
	cfg Config,
	logger log.Logger,
	reg prometheus.Registerer,
) (*BlockBuilderScheduler, error)

func (*BlockBuilderScheduler) AssignJob

AssignJob returns an assigned job for the given workerID.

func (*BlockBuilderScheduler) UpdateJob

UpdateJob takes a job update from the client and records it, if necessary.

type Config

type Config struct {
	ConsumerGroup      string        `yaml:"consumer_group"`
	SchedulingInterval time.Duration `yaml:"kafka_monitor_interval"`
	ConsumeInterval    time.Duration `yaml:"consume_interval"`
	StartupObserveTime time.Duration `yaml:"startup_observe_time"`
	JobLeaseExpiry     time.Duration `yaml:"job_lease_expiry"`

	// Config parameters defined outside the block-builder-scheduler config and are injected dynamically.
	Kafka ingest.KafkaConfig `yaml:"-"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

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