mock

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateK8ObjectFunc

type CreateK8ObjectFunc func(ctx context.Context, object client.Object) error

type DeleteK8ObjectFunc

type DeleteK8ObjectFunc func(ctx context.Context, object client.Object) error

type GetDeploymentsWithLabelFunc

type GetDeploymentsWithLabelFunc func(ctx context.Context, namespace string, labelMap map[string]string) (*v1.DeploymentList, error)

type GetServiceFunc

type GetServiceFunc func(ctx context.Context, namespace string, name string, version string) (*corev1.Service, error)

type GetServiceWithLabelFunc added in v0.1.2

type GetServiceWithLabelFunc func(ctx context.Context, namespace string, labelMap map[string]string) (*corev1.ServiceList, error)

type K8Cluster

type K8Cluster struct {
	GetDeploymentsWithLabelFunc GetDeploymentsWithLabelFunc
	GetServiceFunc              GetServiceFunc
	GetServicesWithLabelFunc    GetServiceWithLabelFunc
	CreateK8ObjectFunc          CreateK8ObjectFunc
	UpdateK8ObjectFunc          UpdateK8ObjectFunc
	UpdateStatusFunc            UpdateStatusFunc
	DeleteK8ObjectFunc          DeleteK8ObjectFunc
}

func (*K8Cluster) CreateK8Object

func (m *K8Cluster) CreateK8Object(ctx context.Context, object client.Object) error

func (*K8Cluster) DeleteK8Object

func (m *K8Cluster) DeleteK8Object(ctx context.Context, object client.Object) error

func (*K8Cluster) GetDeploymentsWithLabel

func (m *K8Cluster) GetDeploymentsWithLabel(ctx context.Context, namespace string, labelMap map[string]string) (*v1.DeploymentList, error)

func (*K8Cluster) GetService

func (m *K8Cluster) GetService(ctx context.Context, namespace string, name string, version string) (*corev1.Service, error)

func (*K8Cluster) GetServicesWithLabel added in v0.1.2

func (m *K8Cluster) GetServicesWithLabel(ctx context.Context, namespace string, labelMap map[string]string) (*corev1.ServiceList, error)

func (*K8Cluster) UpdateK8Object

func (m *K8Cluster) UpdateK8Object(ctx context.Context, object client.Object) error

func (*K8Cluster) UpdateStatus added in v0.4.0

func (m *K8Cluster) UpdateStatus(ctx context.Context, object client.Object) error

type UpdateK8ObjectFunc

type UpdateK8ObjectFunc func(ctx context.Context, object client.Object) error

type UpdateStatusFunc added in v0.4.0

type UpdateStatusFunc func(ctx context.Context, object client.Object) error

Jump to

Keyboard shortcuts

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