Documentation ¶
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