agent

package
v0.0.0-...-e81be6b Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Client *web.Client
	Config *config.AgentConfig
	JobMgr *JobManager

	Version string
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(cfg *config.AgentConfig, version string) *Agent

func (*Agent) Start

func (agent *Agent) Start()

func (*Agent) Stop

func (agent *Agent) Stop()

func (*Agent) Wait

func (agent *Agent) Wait()

type JobManager

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

func NewJobManager

func NewJobManager(agent *Agent) *JobManager

func (*JobManager) AddJobProcessor

func (mgr *JobManager) AddJobProcessor(jobProcessor JobProcessor)

func (*JobManager) CleanupJob

func (mgr *JobManager) CleanupJob(job *model.Job)

func (*JobManager) PollPendingJobs

func (mgr *JobManager) PollPendingJobs() (*model.Job, error)

func (*JobManager) ProcessJob

func (mgr *JobManager) ProcessJob(job *model.Job) (io.ReadCloser, error)

func (*JobManager) Start

func (mgr *JobManager) Start()

func (*JobManager) Stop

func (mgr *JobManager) Stop()

func (*JobManager) StreamJobResults

func (mgr *JobManager) StreamJobResults(job *model.Job, reader io.ReadCloser) error

func (*JobManager) UpdateJob

func (mgr *JobManager) UpdateJob(job *model.Job) error

type JobProcessor

type JobProcessor interface {
	ProcessJob(*model.Job, io.ReadCloser) (io.ReadCloser, error)
	CleanupJob(*model.Job)
	GetDataEpoch() time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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