ttlcache

package
v0.0.0-...-dd7401d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateInstance

func CreateInstance(logger *gosteno.Logger)

Types

type TTLCache

type TTLCache struct {
	sync.RWMutex
	TTL time.Duration
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *TTLCache

GetInstance retrieves the singleton cache

func (*TTLCache) GetOrigin

func (c *TTLCache) GetOrigin(originKey string) (origin map[string]*results.Resource, found bool)

func (*TTLCache) GetResource

func (c *TTLCache) GetResource(originKey, key string) (resource *results.Resource, found bool)

func (*TTLCache) UpdateResource

func (c *TTLCache) UpdateResource(e *loggregator_v2.Envelope)

todo channel for storing messages and having time to update this without locking reading

Jump to

Keyboard shortcuts

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