Version: v0.0.0-...-a69e935 Latest Latest

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 6 Imported by: 0




View Source
const (

	// PelotonArchiver application name
	PelotonArchiver = "peloton-archiver"


This section is empty.


This section is empty.


type ArchiverConfig

type ArchiverConfig struct {
	// enabled flag to toggle archiving
	Enable bool `yaml:"enable"`

	// Flag to constraint pod events
	PodEventsCleanup bool `yaml:"pod_events_cleanup"`

	// HTTP port which Archiver is listening on
	HTTPPort int `yaml:"http_port"`

	// gRPC port which Archiver is listening on
	GRPCPort int `yaml:"grpc_port"`

	// Sleep interval between consecutive archiver runs
	// ex: 30m
	ArchiveInterval time.Duration `yaml:"archive_interval"`

	// Maximum number of entries that can be archived on a single run
	MaxArchiveEntries int `yaml:"max_archive_entries"`

	// Minimum age in days of the jobs to be archived, example: (30 * 24)h
	ArchiveAge time.Duration `yaml:"archive_age"`

	// Time duration of how many jobs to archive at a time
	// example: 1h. This means archive jobs within the last 1hour of ArchiveAge
	// per archiver run
	ArchiveStepSize time.Duration `yaml:"archive_step_size"`

	// Peloton client timeout when querying Peloton API
	PelotonClientTimeout time.Duration `yaml:"peloton_client_timeout"`

	// Max number of retry attempts for Job Query API
	MaxRetryAttemptsJobQuery int `yaml:"max_retry_attempts_job_query"`

	// Retry interval for Job Query API
	RetryIntervalJobQuery time.Duration `yaml:"retry_interval_job_query"`

	// Delay for archiver bootstrapping to account for
	// not overloading jobmgr during recovery
	BootstrapDelay time.Duration `yaml:"bootstrap_delay"`

	// Only stream the jobs to external storage if this is set
	// Do not delete the jobs from local storage
	StreamOnlyMode bool `yaml:"stream_only_mode"`

	// Kafka topic used by archiver to stream jobs via filebeat
	KafkaTopic string `yaml:"kafka_topic"`

ArchiverConfig contains archiver specific configuration

func (*ArchiverConfig) Normalize

func (c *ArchiverConfig) Normalize()

Normalize configuration by setting unassigned fields to default values.

type Config

type Config struct {
	Metrics      metrics.Config        `yaml:"metrics"`
	Election     leader.ElectionConfig `yaml:"election"`
	Archiver     ArchiverConfig        `yaml:"archiver"`
	Health       health.Config         `yaml:"health"`
	SentryConfig logging.SentryConfig  `yaml:"sentry"`
	Auth         auth.Config           `yaml:"auth"`

Config holds all config to run a peloton-archiver server.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL