action

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package action contains a set of APIs for mutating kubernetes objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v0.0.2

func Create(object sdkTypes.Object) (err error)

Create creates the provided object on the server and updates the arg "object" with the result from the server(UID, resourceVersion, etc). Returns an error if the object’s TypeMeta(Kind, APIVersion) or ObjectMeta(Name/GenerateName, Namespace) is missing or incorrect. Can also return an api error from the server e.g AlreadyExists https://github.com/kubernetes/apimachinery/blob/master/pkg/api/errors/errors.go#L423

func Delete added in v0.0.2

func Delete(object sdkTypes.Object, opts ...DeleteOption) (err error)

Delete deletes the specified object Returns an error if the object’s TypeMeta(Kind, APIVersion) or ObjectMeta(Name, Namespace) is missing or incorrect. e.g NotFound https://github.com/kubernetes/apimachinery/blob/master/pkg/api/errors/errors.go#L418 “opts” configures the DeleteOptions When passed WithDeleteOptions(o), the specified metav1.DeleteOptions are set.

func Update added in v0.0.2

func Update(object sdkTypes.Object) (err error)

Update updates the provided object on the server and updates the arg "object" with the result from the server(UID, resourceVersion, etc). Returns an error if the object’s TypeMeta(Kind, APIVersion) or ObjectMeta(Name, Namespace) is missing or incorrect. Can also return an api error from the server e.g Conflict https://github.com/kubernetes/apimachinery/blob/master/pkg/api/errors/errors.go#L428

Types

type DeleteOp added in v0.0.2

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

DeleteOp wraps all the options for Delete().

func NewDeleteOp added in v0.0.2

func NewDeleteOp() *DeleteOp

type DeleteOption added in v0.0.2

type DeleteOption func(*DeleteOp)

DeleteOption configures DeleteOp.

func WithDeleteOptions added in v0.0.2

func WithDeleteOptions(metaDeleteOptions *metav1.DeleteOptions) DeleteOption

WithDeleteOptions sets the metav1.DeleteOptions for the Delete() operation.

Jump to

Keyboard shortcuts

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