Documentation ¶
Index ¶
- Variables
- func NewAppFor(platform string, executableType ExecutableType) *kingpin.Application
- func NewAppsFor(platform string) map[ExecutableType]*kingpin.Application
- type ConfigWrapper
- func (instance ConfigWrapper) Instance() *caretakerd.Config
- func (instance ConfigWrapper) ListenAddress() *FlagWrapper
- func (instance ConfigWrapper) PemFile() *FlagWrapper
- func (instance *ConfigWrapper) ProvideConfig(forDaemon bool) (*caretakerd.Config, error)
- func (instance *ConfigWrapper) Set(value string) error
- func (instance ConfigWrapper) String() string
- type ExecutableType
- type FlagWrapper
- type Stringer
Constants ¶
This section is empty.
Variables ¶
var AllExecutableTypes = []ExecutableType{ Daemon, Control, Generic, }
AllExecutableTypes contains all possible variants of ExecutableType.
Functions ¶
func NewAppFor ¶
func NewAppFor(platform string, executableType ExecutableType) *kingpin.Application
NewAppFor creates a new instance of the command line parser (cli.App) for the given executableType.
func NewAppsFor ¶ added in v0.2.0
func NewAppsFor(platform string) map[ExecutableType]*kingpin.Application
NewAppsFor creates new instances of the command line parser (cli.App) for every ExecutableType.
Types ¶
type ConfigWrapper ¶
type ConfigWrapper struct {
// contains filtered or unexported fields
}
ConfigWrapper wraps the config of caretakerd and triggers the loading of this config file when calling Set(string).
func NewConfigWrapperFor ¶ added in v0.2.0
func NewConfigWrapperFor(platform string) *ConfigWrapper
NewConfigWrapperFor creates a new instance of ConfigWrapper.
func (ConfigWrapper) Instance ¶
func (instance ConfigWrapper) Instance() *caretakerd.Config
Instance returns the final caretakerd Config instance.
func (ConfigWrapper) ListenAddress ¶ added in v0.2.0
func (instance ConfigWrapper) ListenAddress() *FlagWrapper
ListenAddress returns the listenAddress FlagWrapper
func (ConfigWrapper) PemFile ¶ added in v0.2.0
func (instance ConfigWrapper) PemFile() *FlagWrapper
PemFile returns the pemFile FlagWrapper
func (*ConfigWrapper) ProvideConfig ¶ added in v0.2.0
func (instance *ConfigWrapper) ProvideConfig(forDaemon bool) (*caretakerd.Config, error)
ProvideConfig will either return the already loaded configuration or will load it
func (*ConfigWrapper) Set ¶
func (instance *ConfigWrapper) Set(value string) error
Set sets the given string to the current object from a string. Returns an error object if there are problems while transforming the string.
func (ConfigWrapper) String ¶
func (instance ConfigWrapper) String() string
type ExecutableType ¶
type ExecutableType int
ExecutableType represents a type of the caretakerd executable.
const ( // Daemon indicates that this executable is the caretaker daemon itself. Daemon ExecutableType = 0 // Control indicates that this executable is the caretaker control binary. Control ExecutableType = 1 // Generic indicates that this executable is the caretaker binary which combines // daemon and control binary together. Generic ExecutableType = 2 )
func (ExecutableType) String ¶
func (instance ExecutableType) String() string
type FlagWrapper ¶
type FlagWrapper struct {
// contains filtered or unexported fields
}
FlagWrapper wraps generic command line flags.
func NewFlagWrapper ¶
func NewFlagWrapper(initialValue Stringer) *FlagWrapper
NewFlagWrapper creates a new instance of FlagWrapper.
func (FlagWrapper) AssignIfExplicitSet ¶
func (instance FlagWrapper) AssignIfExplicitSet(to interface{})
AssignIfExplicitSet assigns the wrapped value to given object if it was explicitly set before.
func (FlagWrapper) IsExplicitSet ¶
func (instance FlagWrapper) IsExplicitSet() bool
IsExplicitSet returns true if the Set(string) method has been called before.
func (*FlagWrapper) Set ¶
func (instance *FlagWrapper) Set(value string) error
Set sets the given string to the current object from a string. Returns an error object if there are problems while transforming the string.
func (FlagWrapper) String ¶
func (instance FlagWrapper) String() string
func (FlagWrapper) Value ¶
func (instance FlagWrapper) Value() Stringer
Value returns the wrapped generic command line flag.