Documentation
¶
Overview ¶
Package servod provides functions to manage connection and communication with servod daemon on servo-host.
Package servod provides functions to manage connection and communication with servod daemon on servo-host.
Package servod provides functions to manage connection and communication with servod daemon on servo-host.
Package servod provides functions to manage connection and communication with servod daemon on servo-host.
Index ¶
- func Call(ctx context.Context, c *xmlrpc.XMLRpc, timeout time.Duration, method string, ...) (r *xmlrpc_value.Value, rErr error)
- func CallServod(ctx context.Context, req *ServodCallRequest) (*xmlrpc_value.Value, error)
- func GenerateParams(o *tlw.ServodOptions) []string
- func StartServod(ctx context.Context, req *StartServodRequest) error
- func StopServod(ctx context.Context, req *StopServodRequest) error
- type ServodCallRequest
- type StartServodRequest
- type StopServodRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(ctx context.Context, c *xmlrpc.XMLRpc, timeout time.Duration, method string, args []*xmlrpc_value.Value) (r *xmlrpc_value.Value, rErr error)
Call calls xmlrpc service with provided method and arguments.
func CallServod ¶
func CallServod(ctx context.Context, req *ServodCallRequest) (*xmlrpc_value.Value, error)
CallServod executes a command on the servod daemon running on servo-host and returns the output. Method detect and working with all type of hosts.
func GenerateParams ¶
func GenerateParams(o *tlw.ServodOptions) []string
GenerateParams generates command's params based on options. Example output:
"BOARD=${VALUE}" - name of DUT board. "MODEL=${VALUE}" - name of DUT model. "PORT=${VALUE}" - port specified to run servod on servo-host. "SERIAL=${VALUE}" - serial number of root servo. "CONFIG=cr50.xml" - special config for extra ability of CR50. "REC_MODE=1" - start servod in recovery-mode, if root device found then servod will start event not all components detected.
func StartServod ¶
func StartServod(ctx context.Context, req *StartServodRequest) error
StartServod starts servod daemon on servo-host. Method detect and working with all type of hosts.
func StopServod ¶
func StopServod(ctx context.Context, req *StopServodRequest) error
StopServod stops servod daemon on servo-host. Method detect and working with all type of hosts.
Types ¶
type ServodCallRequest ¶
type ServodCallRequest struct { Host string Options *tlw.ServodOptions SSHProvider ssh.SSHProvider // Containers info. ContainerName string // Call info. // Example: power_state:rec is methods `set` with arguments ["power_state"|"rec"] CallMethod string CallArguments []*xmlrpc_value.Value CallTimeout time.Duration }
ServodCallRequest holds data to call servod daemon.
type StartServodRequest ¶
type StartServodRequest struct { Host string Options *tlw.ServodOptions SSHProvider ssh.SSHProvider // Containers info. ContainerName string ContainerNetwork string }
StartServodRequest holds data to start servod container.
type StopServodRequest ¶
type StopServodRequest struct { Host string Options *tlw.ServodOptions SSHProvider ssh.SSHProvider // Containers info. ContainerName string ContainerNetwork string }
StopServodRequest holds data to stop servod container.