clients

package
v0.10.19 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: 4 Imported by: 203

Documentation

Index

Constants

View Source
const DefaultNamespace = "default"

Variables

View Source
var DefaultRefreshRate = time.Second * 30

Functions

func DefaultNamespaceIfEmpty

func DefaultNamespaceIfEmpty(namespace string) string

Types

type DeleteOpts

type DeleteOpts struct {
	Ctx            context.Context
	IgnoreNotExist bool
}

func (DeleteOpts) WithDefaults

func (o DeleteOpts) WithDefaults() DeleteOpts

type ListOpts

type ListOpts struct {
	Ctx      context.Context
	Selector map[string]string
}

func (ListOpts) WithDefaults

func (o ListOpts) WithDefaults() ListOpts

type ReadOpts

type ReadOpts struct {
	Ctx context.Context
}

func (ReadOpts) WithDefaults

func (o ReadOpts) WithDefaults() ReadOpts

type ResourceClient

type ResourceClient interface {
	Kind() string
	NewResource() resources.Resource
	// Deprecated: implemented only by the kubernetes resource client. Will be removed from the interface.
	Register() error
	Read(namespace, name string, opts ReadOpts) (resources.Resource, error)
	Write(resource resources.Resource, opts WriteOpts) (resources.Resource, error)
	Delete(namespace, name string, opts DeleteOpts) error
	List(namespace string, opts ListOpts) (resources.ResourceList, error)
	ResourceWatcher
}

type ResourceClients

type ResourceClients map[string]ResourceClient

func (ResourceClients) Add

func (r ResourceClients) Add(rcs ...ResourceClient)

func (ResourceClients) ForKind

func (r ResourceClients) ForKind(kind string) (ResourceClient, error)

func (ResourceClients) ForResource

func (r ResourceClients) ForResource(resource resources.Resource) (ResourceClient, error)

type ResourceWatch

type ResourceWatch func(ctx context.Context) (<-chan resources.ResourceList, <-chan error, error)

type ResourceWatcher

type ResourceWatcher interface {
	Watch(namespace string, opts WatchOpts) (<-chan resources.ResourceList, <-chan error, error)
}

type StorageWriteOpts

type StorageWriteOpts interface {
	StorageWriteOptsTag()
}

type WatchOpts

type WatchOpts struct {
	Ctx         context.Context
	Selector    map[string]string
	RefreshRate time.Duration
}

RefreshRate is currently ignored by the Kubernetes ResourceClient implementation. To achieve a similar behavior you can use the KubeResourceClientFactory.ResyncPeriod field. The difference is that it will apply to all the watches started by clients built with the factory.

func (WatchOpts) WithDefaults

func (o WatchOpts) WithDefaults() WatchOpts

type WriteOpts

type WriteOpts struct {
	Ctx               context.Context
	OverwriteExisting bool

	// Implementation dependant write opts
	StorageWriteOpts StorageWriteOpts
}

func (WriteOpts) WithDefaults

func (o WriteOpts) WithDefaults() WriteOpts

Directories

Path Synopsis
crd
crd/client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
crd/client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
crd/client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
crd/client/clientset/versioned/typed/solo.io/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
crd/client/clientset/versioned/typed/solo.io/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
crd/solo.io/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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