Documentation ¶
Overview ¶
Package cli provides the BindPlane command line client.
Index ¶
- type BindPlane
- func (i *BindPlane) AddShutdownHook(hook ShutdownHook)
- func (i *BindPlane) Client() (client.BindPlane, error)
- func (i *BindPlane) LogLevel() zapcore.Level
- func (i *BindPlane) Logger() *zap.Logger
- func (i *BindPlane) Printer() printer.Printer
- func (i *BindPlane) SetClient(client client.BindPlane)
- func (i *BindPlane) Shutdown()
- type ShutdownHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindPlane ¶
type BindPlane struct { Config *common.Config // ProfileName represents the name of the current profile in use. If empty, either a --config flag is being used or // there is no current profile name. This is set during initialization in root.go. ProfileName string // ConfigFile is the path to the configuration file in use. This is either the value of the --config flag or the // config file based on the current profile. It will be empty if there is no --config flag or current profile. ConfigFile string // contains filtered or unexported fields }
BindPlane is an instance of the BindPlane command line client
func NewBindPlane ¶
NewBindPlane TODO(doc)
func NewBindPlaneForTesting ¶
func NewBindPlaneForTesting() *BindPlane
NewBindPlaneForTesting is primarily used for testing and sets an empty config, the writer to Stdout, and a nop logger.
func (*BindPlane) AddShutdownHook ¶
func (i *BindPlane) AddShutdownHook(hook ShutdownHook)
AddShutdownHook adds a hook to be called at shutdown. It is expected to be used during initialization and is not safe to call from multiple goroutines. Shutdown hooks will be called on shutdown in the order that they were added (i.e. FIFO).
func (*BindPlane) Client ¶
Client initializes and returns the client. The client will be initialized once.
func (*BindPlane) LogLevel ¶
LogLevel returns the zapcore.Level that will used to initialize the logger. For Production, we use zapcore.InfoLevel. Test and Development both use zapcore.DebugLevel.
func (*BindPlane) Printer ¶
Printer initializes and returns the printer. The printer will be initialized once.
type ShutdownHook ¶
type ShutdownHook func()
ShutdownHook is called at shutdown when added using AddShutdownHook
Directories ¶
Path | Synopsis |
---|---|
Package commands provides the root command and all subcommands for the bindplane-op cli
|
Package commands provides the root command and all subcommands for the bindplane-op cli |
apply
Package apply provides the apply command, which upserts resources from a file to the store.
|
Package apply provides the apply command, which upserts resources from a file to the store. |
copy
Package copy provides the copy command.
|
Package copy provides the copy command. |
delete
Package delete provides the delete command, as well as subcommands for deleting specific resources and resource types.
|
Package delete provides the delete command, as well as subcommands for deleting specific resources and resource types. |
get
Package get provides the get command, which displays one or more resources, as well as subcommands for each resource type.
|
Package get provides the get command, which displays one or more resources, as well as subcommands for each resource type. |
initialize
Package initialize provides the initialize command, which initializes an installation.
|
Package initialize provides the initialize command, which initializes an installation. |
install
Package install provides the install command, which installs a new agent.
|
Package install provides the install command, which installs a new agent. |
label
Package label contains the label command.
|
Package label contains the label command. |
profile
Package profile provides commands for managing BindPlane profile configurations.
|
Package profile provides commands for managing BindPlane profile configurations. |
serve
Package serve provides the `serve` command for the CLI.
|
Package serve provides the `serve` command for the CLI. |
sync
Package sync provides the sync command, which synchronizes an agent-version from github with the store.
|
Package sync provides the sync command, which synchronizes an agent-version from github with the store. |
update
Package update contains the update command, which upgrades a specific agent
|
Package update contains the update command, which upgrades a specific agent |
validate
Package validate provides the validate command
|
Package validate provides the validate command |
version
Package version provides the version command, which prints the BindPlane version.
|
Package version provides the version command, which prints the BindPlane version. |
Package flags provides functions for adding flags to CLI commands
|
Package flags provides functions for adding flags to CLI commands |
Package printer provides an interface for printing resources, and several implementations.
|
Package printer provides an interface for printing resources, and several implementations. |