Documentation ¶
Index ¶
- type ClientV1
- type FakeClient
- func (f *FakeClient) DownloadFile(ctx context.Context, fileId string) ([]byte, error)
- func (f *FakeClient) GetConfig(ctx context.Context) (*plan.Conf, error)
- func (f *FakeClient) GetPlugin(ctx context.Context, name string) (*Plugin, error)
- func (f *FakeClient) RunPlugin(ctx context.Context, step *plan.WorkflowStep) (*report.Report, error)
- func (f *FakeClient) SendReport(ctx context.Context, rep *report.Report) error
- type Plugin
- type RemoteClient
- func (c *RemoteClient) DownloadFile(ctx context.Context, fileId string) ([]byte, error)
- func (c *RemoteClient) GetConfig(ctx context.Context) (*plan.Conf, error)
- func (c *RemoteClient) GetPlugin(ctx context.Context, name string) (*Plugin, error)
- func (s *RemoteClient) Handle(ctx context.Context, msg transport.Extractor) (interface{}, error)
- func (c *RemoteClient) RunPlugin(ctx context.Context, step *plan.WorkflowStep) (*report.Report, error)
- func (c *RemoteClient) SendReport(ctx context.Context, rep *report.Report) error
- func (s *RemoteClient) WaitForConnection(ctx context.Context) error
- type Scripter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientV1 ¶
type ClientV1 interface { GetConfig(ctx context.Context) (*plan.Conf, error) GetPlugin(ctx context.Context, name string) (*Plugin, error) RunPlugin(ctx context.Context, step *plan.WorkflowStep) (*report.Report, error) SendReport(ctx context.Context, rep *report.Report) error DownloadFile(ctx context.Context, fileId string) ([]byte, error) }
Client helps to communicate with agent
type FakeClient ¶
type FakeClient struct { }
fake client helps to make a mock objects if you don't want implement all methods ClientV1 interface
func NewFakeClient ¶
func NewFakeClient() *FakeClient
func (*FakeClient) DownloadFile ¶
func (*FakeClient) RunPlugin ¶
func (f *FakeClient) RunPlugin(ctx context.Context, step *plan.WorkflowStep) (*report.Report, error)
func (*FakeClient) SendReport ¶
type Plugin ¶
func (*Plugin) HasVersion ¶
func (*Plugin) LatestSupportedVersion ¶
func (*Plugin) LatestVersion ¶
type RemoteClient ¶
type RemoteClient struct { FakeClient // TODO (m0sth8): remove when implement all methods // contains filtered or unexported fields }
func NewRemoteClient ¶
func NewRemoteClient(transport transport.Transport) (*RemoteClient, error)
Remote client helps communicate plugins with agent through transport
func (*RemoteClient) DownloadFile ¶
func (*RemoteClient) RunPlugin ¶
func (c *RemoteClient) RunPlugin(ctx context.Context, step *plan.WorkflowStep) (*report.Report, error)
func (*RemoteClient) SendReport ¶
func (*RemoteClient) WaitForConnection ¶
func (s *RemoteClient) WaitForConnection(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.