v1

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKubeconfigsEventLoop

func NewKubeconfigsEventLoop(emitter KubeconfigsEmitter, syncer KubeconfigsSyncer) eventloop.EventLoop

func NewKubeconfigsSimpleEventLoop

func NewKubeconfigsSimpleEventLoop(emitter KubeconfigsSimpleEmitter, syncers ...KubeconfigsSyncer) eventloop.SimpleEventLoop

Types

type KubeConfig

func NewKubeConfig

func NewKubeConfig(namespace, name string) *KubeConfig

func (*KubeConfig) Clone

func (r *KubeConfig) Clone() resources.Resource

func (*KubeConfig) Hash

func (r *KubeConfig) Hash() uint64

type KubeConfigClient

type KubeConfigClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*KubeConfig, error)
	Write(resource *KubeConfig, opts clients.WriteOpts) (*KubeConfig, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (KubeConfigList, error)
	KubeConfigWatcher
}

func NewKubeConfigClient

func NewKubeConfigClient(rcFactory factory.ResourceClientFactory) (KubeConfigClient, error)

func NewKubeConfigClientWithBase

func NewKubeConfigClientWithBase(rc clients.ResourceClient) KubeConfigClient

func NewKubeConfigClientWithToken

func NewKubeConfigClientWithToken(rcFactory factory.ResourceClientFactory, token string) (KubeConfigClient, error)

type KubeConfigList

type KubeConfigList []*KubeConfig

func (KubeConfigList) AsInterfaces

func (list KubeConfigList) AsInterfaces() []interface{}

func (KubeConfigList) AsResources

func (list KubeConfigList) AsResources() resources.ResourceList

func (KubeConfigList) Clone

func (list KubeConfigList) Clone() KubeConfigList

func (KubeConfigList) Each

func (list KubeConfigList) Each(f func(element *KubeConfig))

func (KubeConfigList) EachResource

func (list KubeConfigList) EachResource(f func(element resources.Resource))

func (KubeConfigList) Find

func (list KubeConfigList) Find(namespace, name string) (*KubeConfig, error)

namespace is optional, if left empty, names can collide if the list contains more than one with the same name

func (KubeConfigList) Names

func (list KubeConfigList) Names() []string

func (KubeConfigList) NamespacesDotNames

func (list KubeConfigList) NamespacesDotNames() []string

func (KubeConfigList) Sort

func (list KubeConfigList) Sort() KubeConfigList

type KubeConfigReconciler

type KubeConfigReconciler interface {
	Reconcile(namespace string, desiredResources KubeConfigList, transition TransitionKubeConfigFunc, opts clients.ListOpts) error
}

func NewKubeConfigReconciler

func NewKubeConfigReconciler(client KubeConfigClient) KubeConfigReconciler

type KubeConfigWatcher

type KubeConfigWatcher interface {
	// watch namespace-scoped kubeconfigs
	Watch(namespace string, opts clients.WatchOpts) (<-chan KubeConfigList, <-chan error, error)
}

type KubeconfigsEmitter

type KubeconfigsEmitter interface {
	Register() error
	KubeConfig() KubeConfigClient
	Snapshots(watchNamespaces []string, opts clients.WatchOpts) (<-chan *KubeconfigsSnapshot, <-chan error, error)
}

func NewKubeconfigsEmitter

func NewKubeconfigsEmitter(kubeConfigClient KubeConfigClient) KubeconfigsEmitter

func NewKubeconfigsEmitterWithEmit

func NewKubeconfigsEmitterWithEmit(kubeConfigClient KubeConfigClient, emit <-chan struct{}) KubeconfigsEmitter

type KubeconfigsSimpleEmitter

type KubeconfigsSimpleEmitter interface {
	Snapshots(ctx context.Context) (<-chan *KubeconfigsSnapshot, <-chan error, error)
}

func NewKubeconfigsSimpleEmitter

func NewKubeconfigsSimpleEmitter(aggregatedWatch clients.ResourceWatch) KubeconfigsSimpleEmitter

func NewKubeconfigsSimpleEmitterWithEmit

func NewKubeconfigsSimpleEmitterWithEmit(aggregatedWatch clients.ResourceWatch, emit <-chan struct{}) KubeconfigsSimpleEmitter

type KubeconfigsSnapshot

type KubeconfigsSnapshot struct {
	Kubeconfigs KubeConfigList
}

func (KubeconfigsSnapshot) Clone

func (KubeconfigsSnapshot) Hash

func (s KubeconfigsSnapshot) Hash() uint64

func (KubeconfigsSnapshot) HashFields

func (s KubeconfigsSnapshot) HashFields() []zap.Field

func (KubeconfigsSnapshot) Stringer

type KubeconfigsSnapshotStringer

type KubeconfigsSnapshotStringer struct {
	Version     uint64
	Kubeconfigs []string
}

func (KubeconfigsSnapshotStringer) String

func (ss KubeconfigsSnapshotStringer) String() string

type KubeconfigsSyncDecider deprecated

type KubeconfigsSyncDecider interface {
	KubeconfigsSyncer
	ShouldSync(old, new *KubeconfigsSnapshot) bool
}

Deprecated: use KubeconfigsSyncDeciderWithContext

type KubeconfigsSyncDeciderWithContext

type KubeconfigsSyncDeciderWithContext interface {
	KubeconfigsSyncer
	ShouldSync(ctx context.Context, old, new *KubeconfigsSnapshot) bool
}

type KubeconfigsSyncer

type KubeconfigsSyncer interface {
	Sync(context.Context, *KubeconfigsSnapshot) error
}

type KubeconfigsSyncers

type KubeconfigsSyncers []KubeconfigsSyncer

func (KubeconfigsSyncers) Sync

type TransitionKubeConfigFunc

type TransitionKubeConfigFunc func(original, desired *KubeConfig) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

Directories

Path Synopsis
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