k8s

package
v16.3.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	NamespaceExists(ctx context.Context, name string) bool
	CreateNamespace(ctx context.Context, name string) error
	DeleteNamespace(ctx context.Context, name string) error
	Apply(ctx context.Context, namespace, config string) error
}

type K8sClient

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

func New

func New(log *zap.Logger, factory util.Factory) (*K8sClient, error)

func (*K8sClient) Apply

func (k *K8sClient) Apply(ctx context.Context, namespace string, config string) error

func (*K8sClient) CreateNamespace

func (k *K8sClient) CreateNamespace(ctx context.Context, name string) error

func (*K8sClient) DeleteNamespace

func (k *K8sClient) DeleteNamespace(ctx context.Context, name string) error

func (*K8sClient) NamespaceExists

func (k *K8sClient) NamespaceExists(ctx context.Context, name string) bool

type MockClient

type MockClient struct {
	NamespaceStore map[string]struct{}
	ApplyRecorder  string
}

func NewMockClient

func NewMockClient() *MockClient

func (*MockClient) Apply

func (m *MockClient) Apply(ctx context.Context, namespace, config string) error

func (*MockClient) CreateNamespace

func (m *MockClient) CreateNamespace(ctx context.Context, name string) error

func (*MockClient) DeleteNamespace

func (m *MockClient) DeleteNamespace(ctx context.Context, name string) error

func (*MockClient) NamespaceExists

func (m *MockClient) NamespaceExists(ctx context.Context, name string) bool

Jump to

Keyboard shortcuts

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