Documentation ¶
Overview ¶
Package agent provide support for hidra-agents
Index ¶
- func StartAgent(apiURL, secretToken, datadir string)
- type Agent
- func (a *Agent) DoAPICall(endpoint, method string, body io.Reader) (*http.Response, error)
- func (a *Agent) GetSample(id string) []byte
- func (a *Agent) ListSamples() []models.Sample
- func (a *Agent) PushMetrics(sampleID string, metrics *models.ScenarioResult) error
- func (a *Agent) RemoveDeprecatedSamples(samples []models.Sample, files []fs.FileInfo)
- func (a *Agent) RunAllSamples()
- func (a *Agent) UpdateLocalResources()
- func (a *Agent) UpdateSamplesIfNeeded(samples []models.Sample, files []fs.FileInfo)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartAgent ¶
func StartAgent(apiURL, secretToken, datadir string)
StartAgent Initialize an agent
Types ¶
type Agent ¶
Agent Represent one agent configuration
func (*Agent) ListSamples ¶
ListSamples List all samples related to current agent
func (*Agent) PushMetrics ¶
func (a *Agent) PushMetrics(sampleID string, metrics *models.ScenarioResult) error
PushMetrics Push metrics to API
func (*Agent) RemoveDeprecatedSamples ¶
RemoveDeprecatedSamples Clean up old samples
func (*Agent) RunAllSamples ¶
func (a *Agent) RunAllSamples()
RunAllSamples Run all samples in current agent
func (*Agent) UpdateLocalResources ¶
func (a *Agent) UpdateLocalResources()
UpdateLocalResources Try to update local resources
Click to show internal directories.
Click to hide internal directories.