Documentation
¶
Index ¶
- Constants
- func DecodeCommand(value string) []string
- func EncodeCommand(args []string) string
- type Client
- func (c *Client) Close() error
- func (c *Client) CloseShell(sessionID uint32) error
- func (c *Client) GetStatus() (StatusResponse, error)
- func (c *Client) Install(req InstallRequest) (Empty, error)
- func (c *Client) InstallDistro(url string) error
- func (c *Client) OnShellExit(fn func(sender uint32, ev ShellExitEvent))
- func (c *Client) OnShellExitEvent(fn func(ShellExitEvent))
- func (c *Client) OnShellOutput(fn func(sender uint32, ev ShellOutputEvent))
- func (c *Client) OnShellOutputEvent(fn func(ShellOutputEvent))
- func (c *Client) OpenShell(req ShellOpenRequest) (uint32, error)
- func (c *Client) Raw() *sutra.Client
- func (c *Client) Remove(req Empty) (Empty, error)
- func (c *Client) ResizeShell(sessionID uint32, rows, cols int) error
- func (c *Client) Run(req RunRequest) (RunResult, error)
- func (c *Client) RunDistro(req RunRequest) (RunResult, error)
- func (c *Client) SendShellInput(sessionID uint32, data []byte) error
- func (c *Client) SetTimeout(timeout time.Duration)
- func (c *Client) ShellClose(req ShellCloseRequest) error
- func (c *Client) ShellInput(req ShellInputRequest) error
- func (c *Client) ShellOpen(req ShellOpenRequest) (ShellSession, error)
- func (c *Client) ShellResize(req ShellResizeRequest) error
- func (c *Client) Status(req Empty) (StatusResponse, error)
- func (c *Client) Uninstall() error
- type Empty
- type InstallRequest
- type RunRequest
- type RunResult
- type ShellCloseRequest
- type ShellExitEvent
- type ShellInputRequest
- type ShellOpenRequest
- type ShellOutputEvent
- type ShellResizeRequest
- type ShellSession
- type StatusResponse
Constants ¶
View Source
const ( ServiceName = "dev.avyos.distro" ServiceID uint32 = 112 )
View Source
const ( RequestStatus uint16 = 0x0201 RequestInstall uint16 = 0x0202 RequestRun uint16 = 0x0203 RequestRemove uint16 = 0x0204 RequestShellOpen uint16 = 0x0205 RequestShellInput uint16 = 0x0206 RequestShellResize uint16 = 0x0207 RequestShellClose uint16 = 0x0208 )
View Source
const ( EventShellOutput uint16 = 0x0301 EventShellExit uint16 = 0x0302 )
Variables ¶
This section is empty.
Functions ¶
func DecodeCommand ¶
func EncodeCommand ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CloseShell ¶
func (*Client) GetStatus ¶
func (c *Client) GetStatus() (StatusResponse, error)
func (*Client) InstallDistro ¶
func (*Client) OnShellExit ¶
func (c *Client) OnShellExit(fn func(sender uint32, ev ShellExitEvent))
func (*Client) OnShellExitEvent ¶
func (c *Client) OnShellExitEvent(fn func(ShellExitEvent))
func (*Client) OnShellOutput ¶
func (c *Client) OnShellOutput(fn func(sender uint32, ev ShellOutputEvent))
func (*Client) OnShellOutputEvent ¶
func (c *Client) OnShellOutputEvent(fn func(ShellOutputEvent))
func (*Client) SendShellInput ¶
func (*Client) SetTimeout ¶
func (*Client) ShellClose ¶
func (c *Client) ShellClose(req ShellCloseRequest) error
func (*Client) ShellInput ¶
func (c *Client) ShellInput(req ShellInputRequest) error
func (*Client) ShellOpen ¶
func (c *Client) ShellOpen(req ShellOpenRequest) (ShellSession, error)
func (*Client) ShellResize ¶
func (c *Client) ShellResize(req ShellResizeRequest) error
type InstallRequest ¶
type InstallRequest struct {
URL string
}
func (InstallRequest) MarshalBinary ¶
func (v InstallRequest) MarshalBinary() []byte
func (*InstallRequest) UnmarshalBinary ¶
func (v *InstallRequest) UnmarshalBinary(data []byte) error
type RunRequest ¶
func (RunRequest) MarshalBinary ¶
func (v RunRequest) MarshalBinary() []byte
func (*RunRequest) UnmarshalBinary ¶
func (v *RunRequest) UnmarshalBinary(data []byte) error
type ShellCloseRequest ¶
type ShellCloseRequest struct {
SessionID uint32
}
func (ShellCloseRequest) MarshalBinary ¶
func (v ShellCloseRequest) MarshalBinary() []byte
func (*ShellCloseRequest) UnmarshalBinary ¶
func (v *ShellCloseRequest) UnmarshalBinary(data []byte) error
type ShellExitEvent ¶
func (ShellExitEvent) MarshalBinary ¶
func (v ShellExitEvent) MarshalBinary() []byte
func (*ShellExitEvent) UnmarshalBinary ¶
func (v *ShellExitEvent) UnmarshalBinary(data []byte) error
type ShellInputRequest ¶
func (ShellInputRequest) MarshalBinary ¶
func (v ShellInputRequest) MarshalBinary() []byte
func (*ShellInputRequest) UnmarshalBinary ¶
func (v *ShellInputRequest) UnmarshalBinary(data []byte) error
type ShellOpenRequest ¶
func (ShellOpenRequest) MarshalBinary ¶
func (v ShellOpenRequest) MarshalBinary() []byte
func (*ShellOpenRequest) UnmarshalBinary ¶
func (v *ShellOpenRequest) UnmarshalBinary(data []byte) error
type ShellOutputEvent ¶
func (ShellOutputEvent) MarshalBinary ¶
func (v ShellOutputEvent) MarshalBinary() []byte
func (*ShellOutputEvent) UnmarshalBinary ¶
func (v *ShellOutputEvent) UnmarshalBinary(data []byte) error
type ShellResizeRequest ¶
func (ShellResizeRequest) MarshalBinary ¶
func (v ShellResizeRequest) MarshalBinary() []byte
func (*ShellResizeRequest) UnmarshalBinary ¶
func (v *ShellResizeRequest) UnmarshalBinary(data []byte) error
type ShellSession ¶
type ShellSession struct {
SessionID uint32
}
func (ShellSession) MarshalBinary ¶
func (v ShellSession) MarshalBinary() []byte
func (*ShellSession) UnmarshalBinary ¶
func (v *ShellSession) UnmarshalBinary(data []byte) error
type StatusResponse ¶
func (StatusResponse) MarshalBinary ¶
func (v StatusResponse) MarshalBinary() []byte
func (*StatusResponse) UnmarshalBinary ¶
func (v *StatusResponse) UnmarshalBinary(data []byte) error
Click to show internal directories.
Click to hide internal directories.