storage

package
v0.0.0-...-4dbe146 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdStorage

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

EtcdStorage is the StorageImpl interface implementation for using Etcd as the backing store

func NewEtcdStorage

func NewEtcdStorage(endpoints []string) (*EtcdStorage, error)

NewEtcdStorage instantiates the type and creates the etcd client

func (*EtcdStorage) AllCheckins

func (etcds *EtcdStorage) AllCheckins() (map[string]time.Time, error)

All returns a map of all keys and values

func (*EtcdStorage) AllIncidents

func (etcds *EtcdStorage) AllIncidents() (map[string][]string, error)

func (*EtcdStorage) Purge

func (etcds *EtcdStorage) Purge(prefix string) error

Purge removes all keys with directory/env prefix

func (*EtcdStorage) StoreCheckin

func (etcds *EtcdStorage) StoreCheckin(key string, value time.Time) error

Store stores the key

func (*EtcdStorage) StoreIncident

func (etcds *EtcdStorage) StoreIncident(key string, date string, value []time.Time) error

type StorageImpl

type StorageImpl interface {
	StoreCheckin(string, time.Time) error
	StoreIncident(string, string, []time.Time) error
	AllCheckins() (map[string]time.Time, error)
	AllIncidents() (map[string][]string, error)
}

StorageImpl is an interface for the storage implemntation

Jump to

Keyboard shortcuts

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