cache

package
v0.0.0-...-7630055 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: Apache-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 AgentCache

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

func NewAgentCache

func NewAgentCache(cfg config.Config) *AgentCache

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

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) Init

func (ac AgentCache) Init()

Init will set up the sqlite database to serve as this agent cache.

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