store

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 10 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"`
	Alerts                         alert.EntityAlerts              `json:"-"`
	MessagesWithTimestampPerEntity map[string]map[string]time.Time `json:"messages_with_timestamp_per_entity"`
	// contains filtered or unexported fields
}

func (*ClusterStore) TryAdd

func (clusterStore *ClusterStore) TryAdd(entityName EntityName, message string, now time.Time) bool

type EntityName

type EntityName struct {
	Namespace string `json:"namespace"`
	Kind      string `json:"kind"`
	Name      string `json:"name"`
}

func (*EntityName) String

func (entityName *EntityName) String() string

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

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