cache

package
v0.0.0-...-f6ab670 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCache

func ValidateCache(rawData *model.InstanceAssociation)

ValidateCache validates the current cache is not expired

Types

type Cache

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

func GetCache

func GetCache() *Cache

GetCache returns a singleton of CloudWatchConfig instance

func (*Cache) Add

func (c *Cache) Add(associationID string, associationRawData *model.InstanceAssociation) error

Add an item to the cache only if an item doesn't already exist for the given key, or if the existing item has expired. Returns an error otherwise.

func (*Cache) Get

func (c *Cache) Get(associationID string) *model.InstanceAssociation

Get an item from the cache. Returns the item or nil, and a bool indicating whether the key was found.

func (*Cache) IsCached

func (c *Cache) IsCached(associationID string) bool

IsCached checks if the target cache exists

Jump to

Keyboard shortcuts

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