Documentation ¶
Index ¶
- Constants
- func DefaultUsageFunc(sf *pflag.FlagSet, c *cobra.Command) string
- func GradientBanner(banner string) string
- func InitLogging()
- func NewViper(prefix string) *viper.Viper
- func PopulateFlagSet(obj interface{}, flagSet *pflag.FlagSet, vpr *viper.Viper, opts ...FlagOption) *pflag.FlagSet
- func StartAgent(_ *config.Agent) error
- func Unmarshal(vpr *viper.Viper, cfg interface{}) error
- type AppMetadataMigrator
- type AppMetadataSaver
- type AppNamesGetter
- type CmdRunFn
- type FlagOption
- type Server
Constants ¶
View Source
const OptionsEnd = "--"
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02
Variables ¶
This section is empty.
Functions ¶
func DefaultUsageFunc ¶
TODO: Do we want to keep this or use cobra default one? Maybe banner + cobra default? Or something else? This is mostly copied from ffcli package
func GradientBanner ¶ added in v0.0.40
func InitLogging ¶ added in v0.0.40
func InitLogging()
func PopulateFlagSet ¶ added in v0.0.21
func StartAgent ¶ added in v0.0.38
Types ¶
type AppMetadataMigrator ¶ added in v0.34.0
type AppMetadataMigrator struct {
// contains filtered or unexported fields
}
func NewAppMetadataMigrator ¶ added in v0.34.0
func NewAppMetadataMigrator(logger *logrus.Logger, appNamesGetter AppNamesGetter, appMetadataSaver AppMetadataSaver) *AppMetadataMigrator
func (*AppMetadataMigrator) Migrate ¶ added in v0.34.0
func (m *AppMetadataMigrator) Migrate() (err error)
Migrate creates Applications given a list of app names
type AppMetadataSaver ¶ added in v0.34.0
type AppMetadataSaver interface { CreateOrUpdate(_ context.Context, _ appmetadata.ApplicationMetadata) error List(context.Context) ([]appmetadata.ApplicationMetadata, error) }
type AppNamesGetter ¶ added in v0.34.0
type FlagOption ¶ added in v0.0.34
type FlagOption func(*options)
func WithReplacement ¶ added in v0.0.34
func WithReplacement(k, v string) FlagOption
func WithSkip ¶ added in v0.0.34
func WithSkip(n ...string) FlagOption
func WithSkipDeprecated ¶ added in v0.0.34
func WithSkipDeprecated(ok bool) FlagOption
WithSkipDeprecated specifies that fields marked as deprecated won't be parsed. By default PopulateFlagSet parses them but not shows in Usage; setting this option to true causes PopulateFlagSet to skip parsing.
Click to show internal directories.
Click to hide internal directories.