configuration

package
v0.10.25 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewID added in v0.10.13

NewID returns a new Configuration ID for the given target/type/version

Types

type Store

type Store interface {
	// Get gets the configuration intended for a given target ID
	Get(ctx context.Context, id configapi.ConfigurationID) (*configapi.Configuration, error)

	// Create creates a configuration
	Create(ctx context.Context, configuration *configapi.Configuration) error

	// Update updates a configuration
	Update(ctx context.Context, configuration *configapi.Configuration) error

	// List lists all the configuration
	List(ctx context.Context) ([]*configapi.Configuration, error)

	// Watch watches configuration changes
	Watch(ctx context.Context, ch chan<- configapi.ConfigurationEvent, opts ...WatchOption) error

	// UpdateStatus updates a configuration status
	UpdateStatus(ctx context.Context, configuration *configapi.Configuration) error

	Close(ctx context.Context) error
}

Store configuration store interface

func NewAtomixStore

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

NewAtomixStore returns a new persistent Store

type WatchOption

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

WatchOption is a configuration option for Watch calls

func WithConfigurationID

func WithConfigurationID(id configapi.ConfigurationID) WatchOption

WithConfigurationID returns a Watch option that watches for configurations based on a given configuration 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