fake

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GKEClient

type GKEClient struct {
	MockCreateCluster func(string, computev1alpha2.GKEClusterSpec) (*container.Cluster, error)
	MockGetCluster    func(string, string) (*container.Cluster, error)
	MockDeleteCluster func(string, string) error
}

GKEClient for mocking.

func NewGKEClient

func NewGKEClient() *GKEClient

NewGKEClient returns a fake GKE client for testing.

func (*GKEClient) CreateCluster

func (f *GKEClient) CreateCluster(name string, spec computev1alpha2.GKEClusterSpec) (*container.Cluster, error)

CreateCluster calls the underlying MockCreateCluster method.

func (*GKEClient) DeleteCluster

func (f *GKEClient) DeleteCluster(zone, name string) error

DeleteCluster calls the underlying MockDeleteCluster method.

func (*GKEClient) GetCluster

func (f *GKEClient) GetCluster(zone, name string) (*container.Cluster, error)

GetCluster calls the underlying MockGetCluster method.

Jump to

Keyboard shortcuts

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