persistence

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SharedConfig

type SharedConfig struct {
	Title   string `json:"title"`
	Message string `json:"message"`
}

SharedConfig is useful to change the shared config params for all your spectators

type SharedState

type SharedState struct {
	Board      []*supersense.Event `json:"board"`
	LastUpdate time.Time           `json:"last_update"`
}

SharedState refers to an event board shared for all of your observers (consumers)

type Store

type Store interface {
	CurrentSharedState(lasts int64) (*SharedState, error)
	AddEventToSharedState(event *supersense.Event) error
	Close() error
}

Store represents an interface where you can preserve your global state

Directories

Path Synopsis
stores

Jump to

Keyboard shortcuts

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