cli

package
v2.0.0-...-1f73bd4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintHelp

func PrintHelp(out io.Writer)

PrintHelp prints the command line options help.

Types

type Input

type Input struct {
	// contains filtered or unexported fields
}

Input contains the CLI input values

func Parse

func Parse() (Input, error)

Parse processes and validates command line options.

The result is an input object that allows access to the CLI option values.

func (Input) GetComponent

func (i Input) GetComponent() string

GetComponent returns the component type.

func (Input) GetComponentTitle

func (i Input) GetComponentTitle() string

GetComponentTitle returns the component name and version.

func (Input) GetFrameworkVersion

func (i Input) GetFrameworkVersion() string

GetFrameworkVersion returns the KUSANAGI framework version.

func (Input) GetLogLevel

func (i Input) GetLogLevel() int

GetLogLevel returns the log level.

The INFO level is returned when no log level is defined.

func (Input) GetName

func (i Input) GetName() string

GetName returns the component name.

func (Input) GetPath

func (i Input) GetPath() string

GetPath returns the path to the file being executed.

The path includes the file name.

func (Input) GetSocket

func (i Input) GetSocket() string

GetSocket returns the ZMQ socket name.

func (Input) GetTCP

func (i Input) GetTCP() uint

GetTCP returns the port to use for TCP connections.

func (Input) GetTimeout

func (i Input) GetTimeout() int

GetTimeout returns the process execution timeout in milliseconds.

func (Input) GetVariable

func (i Input) GetVariable(name string) string

GetVariable returns the value for an engine variable.

name: The name of the variable.

func (Input) GetVariables

func (i Input) GetVariables() map[string]string

GetVariables returns all the engine variables.

func (Input) GetVersion

func (i Input) GetVersion() string

GetVersion returns the component version.

func (Input) HasLogging

func (i Input) HasLogging() bool

HasLogging checks if logging is enabled.

func (Input) HasVariable

func (i Input) HasVariable(name string) bool

HasVariable checks if an engine variable is defined.

name: The name of the variable.

func (Input) IsDebugEnabled

func (i Input) IsDebugEnabled() bool

IsDebugEnabled checks if debug is enabled.

func (Input) IsTCPEnabled

func (i Input) IsTCPEnabled() bool

IsTCPEnabled checks if TCP connections should be used instead of IPC.

func (Input) MustDisplayHelp

func (i Input) MustDisplayHelp() bool

MustDisplayHelp checks if the CLI help must be displayed.

Jump to

Keyboard shortcuts

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