Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run( next string, scripts map[string]*configV1.ConfigObject, annotations []*configV1.Annotation, execute func(*configV1.ConfigObject, easyjson.RawMessage) (easyjson.RawMessage, error), wait func(), ) error
Run runs the script with key scriptId in the given scripts map.
Depending on the id in the Next field of the return value any other script in the map may be executed sequentially.
The script arguments are compiled from current script annotations, seed annotations and the contents of the data object returned by the previously executed script (if any). Seed annotations has higher precedence than script annotations and the data field from the return value have highest precedence.
Types ¶
type ReturnValue ¶
type ReturnValue struct {
// WaitForData specifies whether or not one should wait for
// network activity to settle after script execution.
WaitForData bool `json:"waitForData,omitempty"`
// Next specifies the ID of a script to be executed next.
Next string `json:"next,omitempty"`
// Data specifies arguments to a potential next script.
Data easyjson.RawMessage `json:"data,omitempty"`
}
ReturnValue is the return value format for scripts of type ON_LOAD, ON_NEW_DOCUMENT and UNDEFINED.
func (ReturnValue) String ¶
func (rv ReturnValue) String() string
String implements the Stringer interface
Click to show internal directories.
Click to hide internal directories.