Documentation
¶
Index ¶
- Variables
- func CallAgent[I any, O any](ctx context.Context, a *agent.Agent, call rpc.RPCCall[I]) (rpc.RPCResult[O], error)
- func CanConnect(ctx context.Context, connection *types.Connection, maxAttempts int) (bool, error)
- func ConnectionToSSHClientConfig(connection *types.Connection) (*ssh.ClientConfig, string, error)
- func DialWithRetry[T any](ctx context.Context, msg string, maxAttempts int, f func() (T, error)) (T, error)
- func GetTaskResult[T any](playOutput PlayOutput, play int, task int) (T, error)
- func RunPlaybook(ctx context.Context, connection *types.Connection, playbook []byte) ([]byte, error)
- func StartAgent(ctx context.Context, connection *types.Connection) (*agent.Agent, error)
- type Play
- type PlayOutput
- type PlayOutputItemMetadata
- type PlayOutputItemMetadataDuration
- type PlayOutputResult
- type PlayOutputStats
- type PlayOutputTask
Constants ¶
This section is empty.
Variables ¶
View Source
var Tracer = otel.Tracer("mid/provider/executor")
Functions ¶
func CanConnect ¶ added in v0.0.5
func ConnectionToSSHClientConfig ¶ added in v0.0.5
func ConnectionToSSHClientConfig(connection *types.Connection) (*ssh.ClientConfig, string, error)
func DialWithRetry ¶ added in v0.0.5
func GetTaskResult ¶
func GetTaskResult[T any](playOutput PlayOutput, play int, task int) (T, error)
func RunPlaybook ¶
func StartAgent ¶ added in v0.0.5
Types ¶
type PlayOutput ¶
type PlayOutput struct {
CustomStats map[string]any `json:"custom_stats"`
GlobalCustomStats map[string]any `json:"global_custom_stats"`
Results []PlayOutputResult `json:"plays"`
Stats map[string]PlayOutputStats `json:"stats"`
}
func RunPlay ¶
func RunPlay(ctx context.Context, connection *types.Connection, plays ...Play) (PlayOutput, error)
type PlayOutputItemMetadata ¶
type PlayOutputItemMetadata struct {
Duration PlayOutputItemMetadataDuration `json:"duration"`
Id string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
}
type PlayOutputResult ¶
type PlayOutputResult struct {
Play PlayOutputItemMetadata `json:"play"`
Tasks []PlayOutputTask `json:"tasks"`
}
type PlayOutputStats ¶
type PlayOutputTask ¶
type PlayOutputTask struct {
Hosts map[string]any `json:"hosts"`
Task PlayOutputItemMetadata `json:"task"`
}
Click to show internal directories.
Click to hide internal directories.