mock

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 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 runtime.Object) error

type DeleteK8ObjectFunc

type DeleteK8ObjectFunc func(ctx context.Context, object runtime.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) (*corev1.Service, error)

type K8Cluster

type K8Cluster struct {
	GetDeploymentsWithLabelFunc GetDeploymentsWithLabelFunc
	GetServiceFunc              GetServiceFunc
	CreateK8ObjectFunc          CreateK8ObjectFunc
	UpdateK8ObjectFunc          UpdateK8ObjectFunc
	DeleteK8ObjectFunc          DeleteK8ObjectFunc
}

func (*K8Cluster) CreateK8Object

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

func (*K8Cluster) DeleteK8Object

func (m *K8Cluster) DeleteK8Object(ctx context.Context, object runtime.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) (*corev1.Service, error)

func (*K8Cluster) UpdateK8Object

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

type UpdateK8ObjectFunc

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

Jump to

Keyboard shortcuts

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