agent

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is the implementation for twirp to use

func NewService

func NewService(s storage.Storage) *Service

NewService creates the new service with dependencies

func (Service) Actions

func (s Service) Actions(ctx context.Context, cmd *pb.ReadActions) (*pb.ActionsRead, error)

Actions gets the next action for the agent or an empty list if there's nothing to do

func (Service) Ready

func (s Service) Ready() error

Ready implements the ReadyService method so this service can be part of a health check routine

func (Service) Results

func (s Service) Results(ctx context.Context, cmd *pb.ReturnResult) (*pb.ResultReturned, error)

Results returns a result for this agent

func (Service) Run

func (s Service) Run(ctx context.Context, cmd *pb.Action) (*pb.Result, error)

Run runs an action and returns a result from a particular agent

Jump to

Keyboard shortcuts

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