shell

package
v2.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Completer

func Completer(d prompt.Document) []prompt.Suggest

func ConsoleOut

func ConsoleOut(format string, a ...interface{})

ConsoleOut Dump to console

func DebugOut

func DebugOut(format string, a ...interface{})

DebugOut prints debug output to user

func ErrorOut

func ErrorOut(format string, a ...interface{})

func Errorf

func Errorf(format string, a ...interface{}) string

Errorf prints errors to user

func EventOut

func EventOut(cat string, format string, a ...interface{})

func Eventf

func Eventf(category string, format string, a ...interface{}) string

Eventf prints events to user

func Executor

func Executor(t string)

func FormatJsonEasyRead

func FormatJsonEasyRead(out bytes.Buffer, rawjson []byte) (outs string, err error)

func GetCommandsHelpString

func GetCommandsHelpString([]string) (ret string, err error)

func GetLogSubcommandsHelpString

func GetLogSubcommandsHelpString([]string) (ret string, err error)

func GetNetSubcommandsHelpString

func GetNetSubcommandsHelpString([]string) (ret string, err error)

func SetDefaultClient

func SetDefaultClient(client *MaestroClient)

func SuccessOut

func SuccessOut(format string, a ...interface{})

func Successf

func Successf(format string, a ...interface{}) string

Successf prints success events to user

Types

type AliveResponse

type AliveResponse struct {
	Ok     bool
	Uptime int64
}

type Command

type Command func([]string) (out string, err error)

Command is the function definition for any command

type MaestroClient

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

func NewUnixClient

func NewUnixClient(path string) (ret *MaestroClient, err error)

func (*MaestroClient) AddDNS

func (self *MaestroClient) AddDNS(args []string) (string, error)

func (*MaestroClient) ConfigNetInterface

func (self *MaestroClient) ConfigNetInterface(args []string) (string, error)

func (*MaestroClient) DeleteDNS

func (self *MaestroClient) DeleteDNS(args []string) (string, error)

func (*MaestroClient) DeleteLogging

func (self *MaestroClient) DeleteLogging(args []string) (string, error)

func (*MaestroClient) GetAlive

func (self *MaestroClient) GetAlive() (alive *AliveResponse, err error)

func (*MaestroClient) GetAllJobStatus

func (client *MaestroClient) GetAllJobStatus() (out string, err error)

func (*MaestroClient) GetDNS

func (self *MaestroClient) GetDNS() (out string, err error)

func (*MaestroClient) GetLogging

func (self *MaestroClient) GetLogging() (out string, err error)

func (*MaestroClient) GetNetInterfaces

func (self *MaestroClient) GetNetInterfaces() (out string, err error)

func (*MaestroClient) SetLogging

func (self *MaestroClient) SetLogging(args []string) (string, error)

func (*MaestroClient) SubscribeToNetEvents

func (client *MaestroClient) SubscribeToNetEvents() (out string, err error)

SubscribeToNetEvents shell will subscribe to network events

type SubscribeNetEventsResponse

type SubscribeNetEventsResponse struct {
	ID    string `json:"id"`
	Error string `json:"error"`
}

SubscribeNetEventsResponse is the response from a /net/events call

Jump to

Keyboard shortcuts

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