local

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CombinedLocalDoguRegistry

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

CombinedLocalDoguRegistry combines the clusterNativeLocalDoguRegistry and etcdLocalDoguRegistry for backwards-compatability reasons.

func NewCombinedLocalDoguRegistry

func NewCombinedLocalDoguRegistry(configMapClient v1.ConfigMapInterface, etcdRegistry registry.Registry) *CombinedLocalDoguRegistry

func (*CombinedLocalDoguRegistry) Enable

func (cr *CombinedLocalDoguRegistry) Enable(ctx context.Context, dogu *core.Dogu) error

Enable makes the dogu spec reachable.

func (*CombinedLocalDoguRegistry) GetCurrent

func (cr *CombinedLocalDoguRegistry) GetCurrent(ctx context.Context, simpleDoguName string) (*core.Dogu, error)

GetCurrent retrieves the spec of the referenced dogu's currently installed version.

func (*CombinedLocalDoguRegistry) GetCurrentOfAll

func (cr *CombinedLocalDoguRegistry) GetCurrentOfAll(ctx context.Context) ([]*core.Dogu, error)

GetCurrentOfAll retrieves the specs of all dogus' currently installed versions.

func (*CombinedLocalDoguRegistry) IsEnabled

func (cr *CombinedLocalDoguRegistry) IsEnabled(ctx context.Context, simpleDoguName string) (bool, error)

IsEnabled checks if the current spec of the referenced dogu is reachable.

func (*CombinedLocalDoguRegistry) Register

func (cr *CombinedLocalDoguRegistry) Register(ctx context.Context, dogu *core.Dogu) error

Register adds the given dogu spec to the local registry.

func (*CombinedLocalDoguRegistry) UnregisterAllVersions

func (cr *CombinedLocalDoguRegistry) UnregisterAllVersions(ctx context.Context, simpleDoguName string) error

UnregisterAllVersions deletes all versions of the dogu spec from the local registry and makes the spec unreachable.

type LocalDoguRegistry

type LocalDoguRegistry interface {
	// Enable makes the dogu spec reachable.
	Enable(ctx context.Context, dogu *core.Dogu) error
	// Register adds the given dogu spec to the local registry.
	Register(ctx context.Context, dogu *core.Dogu) error
	// UnregisterAllVersions deletes all versions of the dogu spec from the local registry and makes the spec unreachable.
	UnregisterAllVersions(ctx context.Context, simpleDoguName string) error
	// GetCurrent retrieves the spec of the referenced dogu's currently installed version.
	GetCurrent(ctx context.Context, simpleDoguName string) (*core.Dogu, error)
	// GetCurrentOfAll retrieves the specs of all dogus' currently installed versions.
	GetCurrentOfAll(ctx context.Context) ([]*core.Dogu, error)
	// IsEnabled checks if the current spec of the referenced dogu is reachable.
	IsEnabled(ctx context.Context, simpleDoguName string) (bool, error)
}

LocalDoguRegistry abstracts accessing various backends for reading and writing dogu specs (dogu.json).

Jump to

Keyboard shortcuts

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