storage

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryStore

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

InMemoryStore implements an in-memory store

func NewInMemoryStore

func NewInMemoryStore() *InMemoryStore

NewInMemoryStore returns an in-memory store. Note that the store acts as a singleton, so although new-ing up in-memory stores will give you a unique reference to a struct each time, all structs returned by this function will act on the same in-memory store.

func (*InMemoryStore) Clear

func (ims *InMemoryStore) Clear()

Clear will empty all the results from the in memory store

func (*InMemoryStore) GetAllAsJSON added in v1.11.2

func (ims *InMemoryStore) GetAllAsJSON() ([]byte, error)

GetAllAsJSON returns the JSON encoding of all monitored core.ServiceStatus

func (*InMemoryStore) GetServiceStatus

func (ims *InMemoryStore) GetServiceStatus(group, name string) *core.ServiceStatus

GetServiceStatus returns the service status for a given service name in the given group

func (*InMemoryStore) Insert

func (ims *InMemoryStore) Insert(service *core.Service, result *core.Result)

Insert inserts the observed result for the specified service into the in memory store

Jump to

Keyboard shortcuts

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