store

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 7 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"`
	LastRunAt         time.Time            `json:"last_run_at"`
	// contains filtered or unexported fields
}

type Store

type Store struct {
	ClusterStoresByName map[string]*ClusterStore `json:"cluster_stores_by_name"`
	// contains filtered or unexported fields
}

func LoadOrCreate

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

func (*Store) Add

func (store *Store) Add(message string, hashes []string, now time.Time)

func (*Store) Flush

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

func (*Store) IsRelevant

func (store *Store) IsRelevant(tm time.Time) bool

func (*Store) RelevantMessages

func (store *Store) RelevantMessages() []string

func (*Store) ShouldAdd

func (store *Store) ShouldAdd(hash string, now time.Time) bool

Jump to

Keyboard shortcuts

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