view

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Pure ...
	Pure = iota

	// Initializing ...
	Initializing

	// Running ...
	Running
)

Variables

View Source
var ErrCatchup = errors.New("views: catching up with the latest changes")

ErrCatchup is returned when the view is not yet caught up with the latest changes.

Functions

This section is empty.

Types

type Value

type Value interface {
	int | ~string | []byte
}

Value is a value in the table.

type View

type View[V Value] interface {
	// Get is used to retrieve a value from the view.
	Get(key string) (V, error)

	// Set is used to set a value in the view.
	Set(key string, value V) error

	// Delete is used to delete a value from the view.
	Delete(key string) error

	server.Listener
}

View is a view of the data in the table

func New

func New[V Value](table streams.Table, encoder codec.Encoder[V], decoder codec.Decoder[V], store store.Storage) View[V]

New initializes a new view.

Jump to

Keyboard shortcuts

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