options

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormattedOptionName

func FormattedOptionName(key string) string

FormattedOptionName returns the option ready to be used in a command line argument, prefixed with `--`.

func IsPersistentOption

func IsPersistentOption(arg string) bool

func SectionKey

func SectionKey(key string) string

SectionKey returns the name of this option within its configuration section.

func SectionName

func SectionName(key string) string

SectionName returns the name of the configuration section this option belongs to.

Types

type Configuration

type Configuration struct {
	All          ConfigurationType
	Coordinators ConfigurationType
	DBServers    ConfigurationType
	Agents       ConfigurationType

	PersistentOptions PersistentOptions
	// contains filtered or unexported fields
}

func NewConfiguration

func NewConfiguration() Configuration

func (*Configuration) ArgByProcessTypeAndName

func (p *Configuration) ArgByProcessTypeAndName(serverType definitions.ServerType, key string) *[]string

func (*Configuration) ArgByServerTypeAndName

func (p *Configuration) ArgByServerTypeAndName(serverType definitions.ServerType, key string) *[]string

func (*Configuration) ArgsForServerType

func (p *Configuration) ArgsForServerType(serverType definitions.ServerType) map[string][]string

func (*Configuration) ByProcessType

func (p *Configuration) ByProcessType(serverType definitions.ServerType) *ConfigurationType

func (*Configuration) ByServerType

func (p *Configuration) ByServerType(serverType definitions.ServerType) *ConfigurationType

func (*Configuration) EnvByProcessTypeAndName

func (p *Configuration) EnvByProcessTypeAndName(serverType definitions.ServerType, key string) *[]string

func (*Configuration) EnvByServerTypeAndName

func (p *Configuration) EnvByServerTypeAndName(serverType definitions.ServerType, key string) *[]string

func (*Configuration) EnvsForServerType

func (p *Configuration) EnvsForServerType(serverType definitions.ServerType) map[string]string

type ConfigurationFlag

type ConfigurationFlag struct {
	Key       string
	CleanKey  string
	Extension string
	Usage     string
	Value     *[]string

	DeprecatedHint string
}

type ConfigurationPrefix

type ConfigurationPrefix struct {
	Usage                func(key string) string
	FieldSelector        func(p *Configuration, key string) *[]string
	DeprecatedHintFormat string
}

func (ConfigurationPrefix) GetDeprecatedHint

func (p ConfigurationPrefix) GetDeprecatedHint(key string) string

type ConfigurationPrefixes

type ConfigurationPrefixes map[string]ConfigurationPrefix

func (ConfigurationPrefixes) Lookup

func (ConfigurationPrefixes) Parse

func (ConfigurationPrefixes) UsageHint

func (c ConfigurationPrefixes) UsageHint() string

type ConfigurationType

type ConfigurationType struct {
	Args map[string]*[]string
	Envs map[string]*[]string
}

func NewConfigurationType

func NewConfigurationType() ConfigurationType

type PersistentOption

type PersistentOption struct {
	Prefix string    `json:"prefix"`
	Arg    string    `json:"arg"`
	Value  *[]string `json:"value"`
}

type PersistentOptions

type PersistentOptions []PersistentOption

func (*PersistentOptions) Add

func (po *PersistentOptions) Add(prefix, arg string, val *[]string)

func (*PersistentOptions) ValidateCompatibility

func (po *PersistentOptions) ValidateCompatibility(otherOpts *PersistentOptions) error

Jump to

Keyboard shortcuts

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