network

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	io.Closer

	// Get gets a network configuration
	Get(id networkchange.ID) (*networkchange.NetworkChange, error)

	// GetByIndex gets a network change by index
	GetByIndex(index networkchange.Index) (*networkchange.NetworkChange, error)

	// GetPrev gets the previous network change by index
	GetPrev(index networkchange.Index) (*networkchange.NetworkChange, error)

	// GetNext gets the next network change by index
	GetNext(index networkchange.Index) (*networkchange.NetworkChange, error)

	// Create creates a new network configuration
	Create(config *networkchange.NetworkChange) error

	// Update updates an existing network configuration
	Update(config *networkchange.NetworkChange) error

	// Delete deletes a network configuration
	Delete(config *networkchange.NetworkChange) error

	// List lists network configurations
	List(chan<- *networkchange.NetworkChange) (stream.Context, error)

	// Watch watches the network configuration store for changes
	Watch(chan<- stream.Event, ...WatchOption) (stream.Context, error)
}

Store stores NetworkConfig changes

func NewAtomixStore

func NewAtomixStore(config config.Config) (Store, error)

NewAtomixStore returns a new persistent Store

func NewLocalStore

func NewLocalStore() (Store, error)

NewLocalStore returns a new local network change store

type WatchOption

type WatchOption interface {
	// contains filtered or unexported methods
}

WatchOption is a configuration option for Watch calls

func WithChangeID

func WithChangeID(id networkchange.ID) WatchOption

WithChangeID returns a Watch option that watches for changes to the given change ID

func WithReplay

func WithReplay() WatchOption

WithReplay returns a WatchOption that replays past changes

Jump to

Keyboard shortcuts

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