v1

package
v0.30.8 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KubeConfigGVK = schema.GroupVersionKind{
		Version: "v1",
		Group:   "multicluster.solo.io",
		Kind:    "KubeConfig",
	}
)
View Source
var KubeconfigsGvkToHashableResource = map[schema.GroupVersionKind]func() resources.HashableResource{
	KubeConfigGVK: NewKubeConfigHashableResource,
}

Functions

func NewKubeConfigHashableResource added in v0.30.8

func NewKubeConfigHashableResource() resources.HashableResource

func NewKubeconfigsEventLoop

func NewKubeconfigsEventLoop(emitter KubeconfigsSnapshotEmitter, 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) GroupVersionKind added in v0.10.4

func (r *KubeConfig) GroupVersionKind() schema.GroupVersionKind

func (*KubeConfig) Hash

func (r *KubeConfig) Hash(hasher hash.Hash64) (uint64, error)

func (*KubeConfig) MustHash added in v0.11.16

func (r *KubeConfig) MustHash() 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(ctx context.Context, rcFactory factory.ResourceClientFactory) (KubeConfigClient, error)

func NewKubeConfigClientWithBase

func NewKubeConfigClientWithBase(rc clients.ResourceClient) KubeConfigClient

func NewKubeConfigClientWithToken

func NewKubeConfigClientWithToken(ctx context.Context, 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)

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, statusSetter resources.StatusSetter) 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 {
	KubeconfigsSnapshotEmitter
	Register() error
	KubeConfig() KubeConfigClient
}

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) GetResourcesList added in v0.30.8

func (s *KubeconfigsSnapshot) GetResourcesList(resource resources.Resource) (resources.ResourceList, error)

func (KubeconfigsSnapshot) Hash

func (s KubeconfigsSnapshot) Hash(hasher hash.Hash64) (uint64, error)

func (KubeconfigsSnapshot) HashFields

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

func (*KubeconfigsSnapshot) RemoveFromResourceList added in v0.30.8

func (s *KubeconfigsSnapshot) RemoveFromResourceList(resource resources.Resource) error

func (KubeconfigsSnapshot) Stringer

func (*KubeconfigsSnapshot) UpsertToResourceList added in v0.30.8

func (s *KubeconfigsSnapshot) UpsertToResourceList(resource resources.Resource) error

type KubeconfigsSnapshotEmitter added in v0.10.18

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

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