datastore

package
v0.0.0-...-59ddacb Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *dataStore

Types

type Callback

type Callback func(key string, t time.Time, v, old any)

type DataStore

type DataStore interface {
	Publish(key string, v interface{})
	Get(key string) (interface{}, time.Time, error)
	Register(keys []string, f Callback, timeout time.Duration, tf TimeoutF)
	Map() map[string]any
}

type TimeoutF

type TimeoutF func(key string, t time.Time, v any)

Jump to

Keyboard shortcuts

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