alertcache

package
v0.0.0-...-d221b79 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotFound = "not-found"
	BadID    = "bad-id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertCache

type AlertCache interface {
	GetIssue(string) (structs.RoomIssue, *nerr.E)
	GetAllIssues() ([]structs.RoomIssue, *nerr.E)
	PutIssue(structs.RoomIssue) *nerr.E
	DeleteIssue(string) *nerr.E
}

NOTE: the assumption is that the alert caches are NOT safe for concurrent access, concurrency saftey is handled at a higher level.

func GetAlertCache

func GetAlertCache(name string) AlertCache

type RedisAlertCache

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

func (*RedisAlertCache) DeleteIssue

func (r *RedisAlertCache) DeleteIssue(id string) *nerr.E

func (*RedisAlertCache) GetAllIssues

func (r *RedisAlertCache) GetAllIssues() ([]structs.RoomIssue, *nerr.E)

func (*RedisAlertCache) GetIssue

func (r *RedisAlertCache) GetIssue(id string) (structs.RoomIssue, *nerr.E)

func (*RedisAlertCache) PutIssue

func (r *RedisAlertCache) PutIssue(a structs.RoomIssue) *nerr.E

Jump to

Keyboard shortcuts

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