inmem

package
v0.0.0-...-9374869 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMem

type InMem struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

InMem represents the in-memory storage by implementing the storage.Storage interface.

func New

func New(count chan<- int) *InMem

New instantiates and returns an InMem storage.

func (*InMem) DeletePolicy

func (m *InMem) DeletePolicy(name storage.CollectorSetName) error

DeletePolicy provides thread-safe writes to a PolicyMap.

func (*InMem) GetPolicy

func (m *InMem) GetPolicy(name storage.CollectorSetName) (*policy.Policy, bool)

GetPolicy provides thread-safe reads from a PolicyMap.

func (*InMem) IterPolicies

func (m *InMem) IterPolicies() <-chan *policy.Policy

IterPolicies provides thread-safe iteration of a PolicyMap.

func (*InMem) SetPolicy

func (m *InMem) SetPolicy(name storage.CollectorSetName, policy *policy.Policy) error

SetPolicy provides thread-safe writes to a PolicyMap.

type PolicyMap

type PolicyMap map[storage.CollectorSetName]*policy.Policy

PolicyMap is an in-memory data store that is used to cache CollectorSet policies.

Jump to

Keyboard shortcuts

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