state

package
v0.0.0-...-31318cc Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

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

func (*Data) Ts

func (d *Data) Ts() time.Time

type Key

type Key [3]string

type State

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

func NewState

func NewState(ctx context.Context, maxAge time.Duration, m *metrics.Gatherer) *State

func (*State) Get

func (s *State) Get(key [3]string) (interface{}, bool)

func (*State) GetData

func (s *State) GetData(key [3]string) (*Data, bool)

func (*State) MaxAge

func (s *State) MaxAge() time.Duration

func (*State) Set

func (s *State) Set(key [3]string, value interface{})

func (*State) SetWithTimestamp

func (s *State) SetWithTimestamp(key [3]string, ts time.Time, value interface{}) bool

func (*State) Values

func (s *State) Values() StateValues

type StateValues

type StateValues map[Key]*Data

Jump to

Keyboard shortcuts

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