pipelineconfig

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 10 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 {
	// Get gets the pipeline config intended for a given target ID
	Get(ctx context.Context, id p4rtapi.PipelineConfigID) (*p4rtapi.PipelineConfig, error)

	// Create creates a p4 pipeline pipeline config
	Create(ctx context.Context, pipelineConfig *p4rtapi.PipelineConfig) error

	// Update updates a p4 pipeline pipeline config
	Update(ctx context.Context, pipelineConfig *p4rtapi.PipelineConfig) error

	// List lists all the pipeline config
	List(ctx context.Context) ([]*p4rtapi.PipelineConfig, error)

	// Watch watches pipeline config changes
	Watch(ctx context.Context, ch chan<- *p4rtapi.PipelineConfig, opts ...WatchOption) error

	// UpdateStatus updates a pipeline config status
	UpdateStatus(ctx context.Context, pipelineConfig *p4rtapi.PipelineConfig) error

	// Remove removes a pipeline config entry
	Remove(ctx context.Context, id p4rtapi.PipelineConfigID) error

	// Close the data store
	Close(ctx context.Context) error
}

Store P4 pipeline pipelineconfig store interface

func NewAtomixStore

func NewAtomixStore(client primitive.Client) (Store, error)

NewAtomixStore creates a new Atomix store for device pipeline configurations

type WatchOption

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

WatchOption is a pipelineconfig option for Watch calls

func WithPipelineConfigID

func WithPipelineConfigID(id p4rtapi.PipelineConfigID) WatchOption

WithPipelineConfigID returns a Watch option that watches for configurations based on a given pipeline pipelineconfig 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