Documentation ¶
Overview ¶
Package simple is a simple task provider proof of concept.
Index ¶
- type CPUInfo
- type CPUInfoArgs
- type CPUInfoResult
- type DelayedRespArgs
- type DelayedRespResult
- type DiskInfo
- type DiskInfoArgs
- type DiskInfoResult
- type Simple
- func (s *Simple) CPUInfo(req *acomm.Request) (interface{}, *url.URL, error)
- func (s *Simple) DelayedResp(req *acomm.Request) (interface{}, *url.URL, error)
- func (s *Simple) DiskInfo(req *acomm.Request) (interface{}, *url.URL, error)
- func (s *Simple) RegisterTasks(server *provider.Server)
- func (s *Simple) StreamEcho(req *acomm.Request) (interface{}, *url.URL, error)
- func (s *Simple) SystemStatus(req *acomm.Request) (interface{}, *url.URL, error)
- type SystemStatusArgs
- type SystemStatusResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUInfoArgs ¶
type CPUInfoArgs struct {
GuestID string `json:"guest_id"`
}
CPUInfoArgs are arguments for the CPUInfo handler.
type CPUInfoResult ¶
type CPUInfoResult []*CPUInfo
CPUInfoResult is the result data for the CPUInfo handler.
type DelayedRespArgs ¶
DelayedRespArgs are arguments for the DelayedResp handler.
type DelayedRespResult ¶
type DelayedRespResult struct { Delay time.Duration `json:"delay"` ReceivedAt time.Time `json:"received_at"` RespondedAt time.Time `json:"responded_at"` }
DelayedRespResult is the result data for the DelayedResp handler.
type DiskInfoArgs ¶
type DiskInfoArgs struct {
GuestID string `json:"guest_id"`
}
DiskInfoArgs are arguments for the DiskInfo handler.
type DiskInfoResult ¶
type DiskInfoResult []*DiskInfo
DiskInfoResult is the result data for the DiskInfo handler.
type Simple ¶
type Simple struct {
// contains filtered or unexported fields
}
Simple is a simple provider implementation.
func (*Simple) DelayedResp ¶
DelayedResp is a task handler that waits a specified time before returning.
func (*Simple) RegisterTasks ¶
RegisterTasks registers all of Simple's task handlers with the server.
func (*Simple) StreamEcho ¶
StreamEcho is a task handler to echo input back via streaming data.
type SystemStatusArgs ¶
type SystemStatusArgs struct {
GuestID string `json:"guest_id"`
}
SystemStatusArgs are arguments for the SystemStatus handler.
type SystemStatusResult ¶
SystemStatusResult is the result data for the SystemStatus handler.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
provider-simple
Usage $ provider-simple -h Usage of provider-simple: -c, --config_file="": path to config file -p, --default_priority=50: default task priority -l, --log_level="warning": log level: debug/info/warn/error/fatal/panic -t, --request_timeout=0: default timeout for requests made by this provider in seconds -s, --socket_dir="/tmp/cerana": base directory in which to create task sockets
|
Usage $ provider-simple -h Usage of provider-simple: -c, --config_file="": path to config file -p, --default_priority=50: default task priority -l, --log_level="warning": log level: debug/info/warn/error/fatal/panic -t, --request_timeout=0: default timeout for requests made by this provider in seconds -s, --socket_dir="/tmp/cerana": base directory in which to create task sockets |