informer

package
v15.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Informer

type Informer interface {
	Start(ctx context.Context) error
	List() []*ParsedWorkspace
}

type K8sInformer

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

func NewK8sInformer

func NewK8sInformer(log *zap.Logger, informer cache.SharedIndexInformer) (*K8sInformer, error)

func (*K8sInformer) List

func (i *K8sInformer) List() []*ParsedWorkspace

func (*K8sInformer) Start

func (i *K8sInformer) Start(ctx context.Context) error

type MockInformer

type MockInformer struct {
	Resources map[string]*ParsedWorkspace
}

func NewMockInformer

func NewMockInformer() *MockInformer

func (*MockInformer) List

func (i *MockInformer) List() []*ParsedWorkspace

func (*MockInformer) Start

func (i *MockInformer) Start(ctx context.Context) error

type ParsedWorkspace

type ParsedWorkspace struct {
	Name              string
	Namespace         string
	ResourceVersion   string
	K8sDeploymentInfo map[string]interface{}
}

ParsedWorkspace is our internal view on the full unstructured.Unstructured k8s resource. We use ParsedWorkspace for logic like checking if the latest change has been persisted or whether we terminated the workspace

Jump to

Keyboard shortcuts

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