config

package
v1.9.26 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SectionKey = "tasks"

Variables

This section is empty.

Functions

This section is empty.

Types

type BackOffConfig

type BackOffConfig struct {
	BaseSecond  int             `json:"base-second" pflag:",The number of seconds representing the base duration of the exponential backoff"`
	MaxDuration config.Duration `json:"max-duration" pflag:",The cap of the backoff duration"`
}

type Config

type Config struct {
	TaskPlugins            TaskPluginConfig `json:"task-plugins" pflag:",Task plugin configuration"`
	MaxPluginPhaseVersions int32            `json:"max-plugin-phase-versions" pflag:",Maximum number of plugin phase versions allowed for one phase."`
	BackOffConfig          BackOffConfig    `json:"backoff" pflag:",Config for Exponential BackOff implementation"`
	MaxErrorMessageLength  int              `json:"maxLogMessageLength" pflag:",Deprecated!!! Max length of error message."`
}

func GetConfig

func GetConfig() *Config

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

type PluginID

type PluginID = string

type PluginsConfigMeta

type PluginsConfigMeta struct {
	EnabledPlugins         sets.String
	AllDefaultForTaskTypes map[PluginID][]TaskType
}

Contains the set of enabled plugins for this flytepropeller deployment along with default plugin handlers for specific task types.

type TaskPluginConfig

type TaskPluginConfig struct {
	EnabledPlugins []string `json:"enabled-plugins" pflag:",Plugins enabled currently"`
	// Maps task types to their plugin handler (by ID).
	DefaultForTaskTypes map[string]string `json:"default-for-task-types" pflag:"-,"`
}

func (TaskPluginConfig) GetEnabledPlugins

func (p TaskPluginConfig) GetEnabledPlugins() (PluginsConfigMeta, error)

type TaskType

type TaskType = string

Jump to

Keyboard shortcuts

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