store

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterStore

type ClusterStore struct {
	Cluster           string               `json:"cluster"`
	HashWithTimestamp map[string]time.Time `json:"hash_with_timestamp"`
	Alerts            alert.EntityAlerts   `json:"-"`
	// contains filtered or unexported fields
}

func (*ClusterStore) Add added in v0.1.5

func (clusterStore *ClusterStore) Add(entityAlert *alert.EntityAlert, hashes []string, now time.Time)

func (*ClusterStore) ShouldAdd added in v0.1.5

func (clusterStore *ClusterStore) ShouldAdd(hash string, now time.Time) bool

type Store

type Store struct {
	ClusterStoresByName map[string]*ClusterStore `json:"cluster_stores_by_name"`

	LastRunAt time.Time `json:"last_run_at"`
	// contains filtered or unexported fields
}

func LoadOrCreate

func LoadOrCreate(config *config.Config) (*Store, error)

func (*Store) Flush

func (store *Store) Flush(now time.Time) error

func (*Store) GetClusterStore added in v0.1.5

func (store *Store) GetClusterStore(name string, now time.Time) *ClusterStore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳