agent

package
v0.0.0-...-af13ce4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCommand

func RunCommand(cmd *api.Command) (*api.CommandResponse, error)

func RunScript

func RunScript(cmd *api.Script) (*api.ScriptResponse, error)

Types

type Agent

type Agent struct {
	api.UnimplementedInstructionServer
	// contains filtered or unexported fields
}

func New

func New(opts ...AgentOption) *Agent

func (*Agent) Command

func (a *Agent) Command(ctx context.Context, req *api.CommandRequest) (*api.CommandResponse, error)

func (*Agent) Script

func (a *Agent) Script(ctx context.Context, req *api.ScriptRequest) (*api.ScriptResponse, error)

func (*Agent) Start

func (a *Agent) Start(ctx context.Context) error

type AgentOption

type AgentOption func(*AgentOptions)

func WithExtraAuthorizedKeys

func WithExtraAuthorizedKeys(keys ...string) AgentOption

func WithInsecure

func WithInsecure(insecure bool) AgentOption

func WithRelayAddress

func WithRelayAddress(addr string) AgentOption

func WithRelayCACert

func WithRelayCACert(certFilePath string) AgentOption

func WithTimeout

func WithTimeout(d time.Duration) AgentOption

type AgentOptions

type AgentOptions struct {
	// contains filtered or unexported fields
}

func (*AgentOptions) Apply

func (o *AgentOptions) Apply(opts ...AgentOption)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL