Documentation ¶
Index ¶
- func ConfigureLogger(logIn logging.Logger, cfg LogConfig) error
- func OutputJSON(writer io.Writer, in interface{}, inErr error) error
- type ArgsHandler
- type ConfGenCmd
- type DumpTopologyCmd
- type JSONOutputCmd
- type JSONOutputter
- type LogCmd
- type LogConfig
- type LogSetter
- type ManCmd
- type ManPageWriter
- type NoArgsCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogger ¶
ConfigureLogger configures the logger according to the requested config.
Types ¶
type ArgsHandler ¶
type ConfGenCmd ¶
type ConfGenCmd struct { MgmtSvcReplicas string `` /* 154-byte string literal not displayed */ NrEngines int `` /* 225-byte string literal not displayed */ SCMOnly bool `short:"s" long:"scm-only" description:"Create a SCM-only config without NVMe SSDs."` NetClass string `` /* 139-byte string literal not displayed */ NetProvider string `short:"p" long:"net-provider" description:"Set the network fabric provider to be used"` UseTmpfsSCM bool `short:"t" long:"use-tmpfs-scm" description:"Use tmpfs for scm rather than PMem"` ExtMetadataPath string `` /* 193-byte string literal not displayed */ FabricPorts string `` /* 172-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ConfGenCmd) CheckDeprecated ¶
func (cmd *ConfGenCmd) CheckDeprecated(log logging.Logger)
CheckDeprecated will check for deprecated parameters and update as needed.
type DumpTopologyCmd ¶
type DumpTopologyCmd struct { JSONOutputCmd LogCmd Output string `short:"o" long:"output" default:"stdout" description:"Dump output to this location"` }
DumpTopologyCmd implements a go-flags Commander that dumps the system topology to stdout or to a file.
func (*DumpTopologyCmd) Execute ¶
func (cmd *DumpTopologyCmd) Execute(_ []string) error
type JSONOutputCmd ¶
type JSONOutputCmd struct {
// contains filtered or unexported fields
}
JSONOutputCmd is a struct that implements JSONOutputter and can be embedded in a command struct to provide JSON output.
func (*JSONOutputCmd) EnableJSONOutput ¶
func (cmd *JSONOutputCmd) EnableJSONOutput(writer io.Writer, wroteJSON *atm.Bool)
EnableJSONOutput enables JSON output to the given writer. The wroteJSON parameter is optional and is used to track whether JSON has been written to the writer.
func (*JSONOutputCmd) JSONOutputEnabled ¶
func (cmd *JSONOutputCmd) JSONOutputEnabled() bool
JSONOutputEnabled returns true if JSON output is enabled.
func (*JSONOutputCmd) OutputJSON ¶
func (cmd *JSONOutputCmd) OutputJSON(in interface{}, err error) error
OutputJSON writes the given data or error to the command's writer as JSON.
type JSONOutputter ¶
type JSONOutputter interface { EnableJSONOutput(io.Writer, *atm.Bool) JSONOutputEnabled() bool OutputJSON(interface{}, error) error }
JSONOutputter is an interface for commands that can output JSON.
type LogCmd ¶
LogCmd is an embeddable type that extends a command with logging capabilities.
func (*LogCmd) MustLogCtx ¶
MustLogCtx returns a context with the command's logger set. NB: Panics on error.
type LogConfig ¶
type LogConfig struct { LogFile string LogLevel common.ControlLogLevel JSON bool }
LogConfig contains parameters used to configure the logger.
type ManCmd ¶
type ManCmd struct { Output string `long:"output" short:"o" description:"output file"` // contains filtered or unexported fields }
ManCmd defines a go-flags subcommand handler for generating a manpage.
func (*ManCmd) SetWriteFunc ¶
type ManPageWriter ¶
ManPageWriter defines an interface to be implemented by commands that write a man page.
type NoArgsCmd ¶
type NoArgsCmd struct{}
NoArgsCmd defines an embeddable struct that can be used to implement a command that does not take any arguments.