Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunCommand ¶
func RunCommand(cmd *api.Command) (*api.CommandResponse, 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)
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)
Click to show internal directories.
Click to hide internal directories.