client

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *rest.Config) (*rest.RESTClient, *runtime.Scheme, error)

TODO: make this private so that we don't expose RESTClient once operator code uses this client instead of REST calls

Types

type EtcdClusterCR

type EtcdClusterCR interface {
	RESTClient() *rest.RESTClient

	// Create creates an etcd cluster CR with the desired CR
	Create(ctx context.Context, cl *spec.EtcdCluster) (*spec.EtcdCluster, error)

	// Get returns the specified etcd cluster CR
	Get(ctx context.Context, namespace, name string) (*spec.EtcdCluster, error)

	// Delete deletes the specified etcd cluster CR
	Delete(ctx context.Context, namespace, name string) error

	// Update updates the etcd cluster CR.
	Update(ctx context.Context, etcdCluster *spec.EtcdCluster) (*spec.EtcdCluster, error)
}

func MustNewCRInCluster

func MustNewCRInCluster() EtcdClusterCR

func NewCRClient

func NewCRClient(cfg *rest.Config) (EtcdClusterCR, error)

Jump to

Keyboard shortcuts

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