Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentCommand ¶
type ConcurrentCommand []Command
ConcurrentCommand describes a set of commands that should be executed simultaneously.
func (*ConcurrentCommand) UnmarshalJSON ¶
func (c *ConcurrentCommand) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON converts b to a ConcurrentCommand. b must be a JSON array of commands.
type InvalidCommandTypeError ¶
type InvalidCommandTypeError struct {
Command Command
}
InvalidCommandTypeError is returned when a type-switch on a Command does not reveal a known Command.
func (InvalidCommandTypeError) Error ¶
func (e InvalidCommandTypeError) Error() string
type MultipleKeysInCommandMapError ¶
type MultipleKeysInCommandMapError struct {
CommandMap map[string]interface{}
}
MultipleKeysInCommandMapError is returned when there is more than one key in a command map.
func (MultipleKeysInCommandMapError) Error ¶
func (e MultipleKeysInCommandMapError) Error() string
type RequestCommand ¶
type RequestCommand struct { ServiceName string `json:"service"` // Size is the number of bytes in the request body. Size size.ByteSize `json:"size"` }
RequestCommand describes a command to send an HTTP request to another service.
var ( // DefaultRequestCommand is used by UnmarshalJSON to set defaults. DefaultRequestCommand RequestCommand )
func (*RequestCommand) UnmarshalJSON ¶
func (c *RequestCommand) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON converts b to a RequestCommand. If b is a JSON string, it is set as c's ServiceName. If b is a JSON object, it's properties are mapped to c.
type Script ¶
type Script []Command
Script is a list of commands to be sequentially executed.
func (Script) MarshalJSON ¶
MarshalJSON encodes the Script as a JSON array of JSON objects.
func (*Script) UnmarshalJSON ¶
UnmarshalJSON converts b to a Script. b must be a JSON array of Commands.
type SleepCommand ¶
SleepCommand describes a command to pause for a duration.
func (SleepCommand) String ¶
func (c SleepCommand) String() string
func (*SleepCommand) UnmarshalJSON ¶
func (c *SleepCommand) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON converts a JSON object to a SleepCommand.
type UnknownCommandKeyError ¶
type UnknownCommandKeyError struct {
CommandKey string
}
UnknownCommandKeyError is returned when a command's key (i.e. "sleep") does not match a known command.
func (UnknownCommandKeyError) Error ¶
func (e UnknownCommandKeyError) Error() string