cmd

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const EnvNamePrefix = "HEGEL"

EnvNamePrefix defines the environment variable prefix required for all environment configuration.

Variables

This section is empty.

Functions

This section is empty.

Types

type RootCommand

type RootCommand struct {
	*cobra.Command

	Opts RootCommandOptions
	// contains filtered or unexported fields
}

RootCommand is the root command that represents the entrypoint to Hegel.

func NewRootCommand

func NewRootCommand() (*RootCommand, error)

NewRootCommand creates new RootCommand instance.

func (*RootCommand) PreRun

func (c *RootCommand) PreRun(*cobra.Command, []string) error

PreRun satisfies cobra.Command.PreRunE and unmarshalls. Its responsible for populating c.Opts.

func (*RootCommand) Run

func (c *RootCommand) Run(cmd *cobra.Command, _ []string) error

Run executes Hegel.

type RootCommandOptions

type RootCommandOptions struct {
	TrustedProxies       string `mapstructure:"trusted-proxies"`
	HTTPAddr             string `mapstructure:"http-addr"`
	Backend              string `mapstructure:"backend"`
	KubernetesAPIServer  string `mapstructure:"kubernetes-apiserver"`
	KubernetesKubeconfig string `mapstructure:"kubernetes-kubeconfig"`
	KubernetesNamespace  string `mapstructure:"kubernetes-namespace"`
	FlatfilePath         string `mapstructure:"flatfile-path"`
	Debug                bool   `mapstructure:"debug"`

	// Hidden CLI flags.
	HegelAPI bool `mapstructure:"hegel-api"`
}

RootCommandOptions encompasses all the configurability of the RootCommand.

Jump to

Keyboard shortcuts

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