cache

package
v0.0.0-...-56a9bdf Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentCache

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

AgentCache provides methods for interacting with the on disk cache.

func New

func New(cfg config.Config) (*AgentCache, error)

New returns an initialized instance of AgentCache.

func (*AgentCache) Close

func (ac *AgentCache) Close() error

Close closes the underlying database connection.

func (*AgentCache) DeleteTestRun

func (ac *AgentCache) DeleteTestRun(uuid string) error

DeleteTestRun will remove an entire testrun entry from teh agent cache by UUID

func (*AgentCache) GetFinishedTestRuns

func (ac *AgentCache) GetFinishedTestRuns() (map[string]string, error)

GetFinishedTestRuns returns a map of test UUIDS (keys) and the corresponding post-test metric data for those UUIDs (values) The metric data is stored as a string containing JSON text, so this is what's placed into this map (meaning JSON parsing is not performed in this function)

func (*AgentCache) GetKeyValue

func (ac *AgentCache) GetKeyValue(key string) (string, error)

GetKeyValue will retrieve a value from the agent cache using a key string

func (*AgentCache) GetTestRun

func (ac *AgentCache) GetTestRun(uuid string) (*defs.TestRun, error)

GetTestRun retrieves a testrun from the agent cache by its UUID

func (*AgentCache) InsertTestRun

func (ac *AgentCache) InsertTestRun(tr defs.TestRun) error

InsertTestRun places a new test run into the agent cache

func (*AgentCache) SetKeyValue

func (ac *AgentCache) SetKeyValue(key, value string) error

SetKeyValue sets a KeyValue pair within the agent cache

func (*AgentCache) UpdateTestRunData

func (ac *AgentCache) UpdateTestRunData(uuid string, testData string) error

UpdateTestRunData will update an existing testrun entry in the agent cache with the post-test metrics dataset that corresponds to that testrun (by testrun UUID)

Jump to

Keyboard shortcuts

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