inmemory

package
v0.0.0-...-1730ba2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package inmemory implements an in-memory storage of the system state

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemory

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

InMemory stores the system state in memory

func WithState

func WithState(s qaclana.State) *InMemory

WithState constructs a new InMemory storage with the given state as initial state

func (*InMemory) Current

func (m *InMemory) Current() (qaclana.State, error)

Current gets the currently set system state

func (*InMemory) Notifier

func (m *InMemory) Notifier() (<-chan qaclana.State, error)

Notifier yields a channel used to notify state changes

func (*InMemory) NotifyAll

func (m *InMemory) NotifyAll(s qaclana.State) error

NotifyAll propagates a state change to all registered notifiers

func (*InMemory) Store

func (m *InMemory) Store(ctx context.Context, s qaclana.State) error

Store the given state in memory

Jump to

Keyboard shortcuts

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