state

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ETCDConfig

type ETCDConfig struct {
	ReleaseName string
	ServerIndex string
	Endpoints   []string

	ACKTimeout time.Duration
	// contains filtered or unexported fields
}

func EnvETCDConfig

func EnvETCDConfig() *ETCDConfig

type ETCDManager

type ETCDManager struct {
	Config *ETCDConfig
	Client *clientv3.Client
	// contains filtered or unexported fields
}

func NewETCDDynamicProvider

func NewETCDDynamicProvider() *ETCDManager

func (*ETCDManager) Close

func (manager *ETCDManager) Close()

func (*ETCDManager) Ping

func (manager *ETCDManager) Ping() error

Ping ensures the connection to etcd is alive

func (*ETCDManager) ServerMode

func (manager *ETCDManager) ServerMode(ctx context.Context) <-chan servermode.ChangeEvent

func (*ETCDManager) WorkspaceIDs

func (manager *ETCDManager) WorkspaceIDs(ctx context.Context) <-chan workspace.ChangeEvent

type StaticProvider

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

func NewStaticProvider

func NewStaticProvider(Mode servermode.Mode) *StaticProvider

func (*StaticProvider) ServerMode

func (s *StaticProvider) ServerMode(ctx context.Context) <-chan servermode.ChangeEvent

ServerMode returns a channel with a single message containing this static provider's mode.

func (*StaticProvider) WorkspaceIDs

func (*StaticProvider) WorkspaceIDs(ctx context.Context) <-chan workspace.ChangeEvent

WorkspaceIDs returns an empty channel, since we don't expect workspaceIDs updates with static provider TODO: This method should return proper workspaceIDs for backend config, even with static provide.

Jump to

Keyboard shortcuts

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