Documentation ¶
Overview ¶
Package qga - common functions for qemu-ga
Index ¶
- Variables
- func GetVersion() string
- func RegisterCommand(cmd *Command)
- func StoreDel(ns string, k interface{})
- func StoreGet(ns string, k interface{}) (interface{}, bool)
- func StoreSet(ns string, k interface{}, v interface{})
- type Channel
- type Command
- type Error
- type ExecStatus
- type FileSystem
- type Logger
- func (l *Logger) Alert(msg string) error
- func (l *Logger) Alertf(f string, msg string) error
- func (l *Logger) Close() error
- func (l *Logger) Crit(msg string) error
- func (l *Logger) Critf(f string, msg string) error
- func (l *Logger) Debug(msg string) error
- func (l *Logger) Debugf(f string, msg string) error
- func (l *Logger) Emerg(msg string) error
- func (l *Logger) Emergf(f string, msg string) error
- func (l *Logger) Error(msg string) error
- func (l *Logger) Errorf(f string, msg string) error
- func (l *Logger) Info(msg string) error
- func (l *Logger) Infof(f string, msg string) error
- func (l *Logger) Notice(msg string) error
- func (l *Logger) Noticef(f string, msg string) error
- func (l *Logger) Warn(msg string) error
- func (l *Logger) Warnf(f string, msg string) error
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version string (git descrive --long) Version string // BuildTime build time BuildTime string )
Functions ¶
func RegisterCommand ¶
func RegisterCommand(cmd *Command)
RegisterCommand registers command to process inside worker
Types ¶
type Command ¶
type Command struct { Enabled bool `json:"enabled"` // flag to enable command Name string `json:"name"` // command name Func func(*Request) *Response `json:"-"` // command execution function Returns bool `json:"success-response"` // flag for command returned value on success Arguments bool `json:"-"` // flag for comand that it needs arguments }
Command struct contains supported commands
type Error ¶
type Error struct { Class string `json:"class,omitempty"` Desc string `json:"desc,omitempty"` Bufb64 string `json:"bufb64,omitempty"` Code int `json:"code,omitempty"` }
Error struct used to indicate error when processing command
type ExecStatus ¶
type ExecStatus struct { Exited bool `json:"exited"` ExitCode *int `json:"exitcode,omitempty"` Signal int `json:"signal,omitempty"` OutData string `json:"out-data,omitempty"` ErrData string `json:"err-data,omitempty"` OutTrunc bool `json:"out-truncated,omitempty"` ErrTrunc bool `json:"err-truncated,omitempty"` }
type FileSystem ¶
FileSystem struct
func ListMountedFileSystems ¶
func ListMountedFileSystems() ([]FileSystem, error)
Click to show internal directories.
Click to hide internal directories.