Documentation
¶
Index ¶
- func ServerRoute(rpcFunction RPCFunction, args any) (any, error)
- type AgentPingArgs
- type AgentPingResult
- type AnsibleExecuteArgs
- type AnsibleExecuteResult
- type ExecArgs
- type ExecResult
- type FileStatArgs
- type FileStatResult
- type RPCCall
- type RPCFunction
- type RPCResult
- type SystemdUnitShortStatusArgs
- type SystemdUnitShortStatusResult
- type UntarArgs
- type UntarResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerRoute ¶
func ServerRoute(rpcFunction RPCFunction, args any) (any, error)
Types ¶
type AgentPingArgs ¶
type AgentPingArgs struct {
Ping string
}
type AgentPingResult ¶
func AgentPing ¶
func AgentPing(args AgentPingArgs) (AgentPingResult, error)
type AnsibleExecuteArgs ¶ added in v0.0.6
type AnsibleExecuteResult ¶ added in v0.0.6
type AnsibleExecuteResult struct {
Stderr []byte
Stdout []byte
ExitCode int
Success bool
Result map[string]any
DebugTempDir string
}
func AnsibleExecute ¶ added in v0.0.6
func AnsibleExecute(args AnsibleExecuteArgs) (AnsibleExecuteResult, error)
type ExecResult ¶
func Exec ¶
func Exec(args ExecArgs) (ExecResult, error)
type FileStatArgs ¶
type FileStatResult ¶
type FileStatResult struct {
// always returned
Path string
Exists bool
// usually returned
BaseName *string `json:",omitempty"`
Size *int64 `json:",omitempty"`
FileMode *fs.FileMode `json:",omitempty"`
ModifiedTime *time.Time `json:",omitempty"`
// depends on FileInfo.Sys()
AccessTime *time.Time `json:",omitempty"`
CreateTime *time.Time `json:",omitempty"`
Dev *uint64 `json:",omitempty"`
Gid *uint64 `json:",omitempty"`
GroupName *string `json:",omitempty"`
Inode *uint64 `json:",omitempty"`
Nlink *uint64 `json:",omitempty"`
Uid *uint64 `json:",omitempty"`
UserName *string `json:",omitempty"`
// conditional on CalculateChecksum
SHA256Checksum *string `json:",omitempty"`
}
func FileStat ¶
func FileStat(args FileStatArgs) (FileStatResult, error)
type RPCCall ¶
type RPCCall[T any] struct { UUID string RPCFunction RPCFunction Args T }
type RPCFunction ¶
type RPCFunction string
const ( RPCAgentPing RPCFunction = "AgentPing" RPCAnsibleExecute RPCFunction = "AnsibleExecute" RPCClose RPCFunction = "Close" RPCExec RPCFunction = "Exec" RPCFileStat RPCFunction = "FileStat" RPCSystemdUnitShortStatus RPCFunction = "SystemdUnitShortStatus" RPCUntar RPCFunction = "Untar" )
type RPCResult ¶
type RPCResult[T any] struct { UUID string RPCFunction RPCFunction Result T Error string }
type SystemdUnitShortStatusArgs ¶ added in v0.0.8
type SystemdUnitShortStatusArgs struct {
Name string
}
type SystemdUnitShortStatusResult ¶ added in v0.0.8
type SystemdUnitShortStatusResult struct {
Name string
Exists bool
LoadState string
ActiveState string
SubState string
}
func SystemdUnitShortStatus ¶ added in v0.0.8
func SystemdUnitShortStatus(args SystemdUnitShortStatusArgs) (SystemdUnitShortStatusResult, error)
type UntarResult ¶ added in v0.0.8
type UntarResult struct{}
func Untar ¶ added in v0.0.8
func Untar(args UntarArgs) (UntarResult, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.