watcher

package
v0.2.138 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adaptor

type Adaptor interface {
	WatchResources
	Watcher
}

type AdaptorMock

type AdaptorMock struct {
	WatcherMock
	WatchResource []WatchResourceMock
}

func (*AdaptorMock) WatchResources

func (am *AdaptorMock) WatchResources() []WatchResource

type WatchResource

type WatchResource interface {
	GroupVersionResource() schema.GroupVersionResource
	ListOptions() metav1.ListOptions
}

type WatchResourceImpl

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

func NewWatchResource

func NewWatchResource(groupVersionResource schema.GroupVersionResource, listOptions metav1.ListOptions) *WatchResourceImpl

func (*WatchResourceImpl) GroupVersionResource

func (wr *WatchResourceImpl) GroupVersionResource() schema.GroupVersionResource

func (*WatchResourceImpl) ListOptions

func (wr *WatchResourceImpl) ListOptions() metav1.ListOptions

type WatchResourceMock

type WatchResourceMock struct {
	ListOpt metav1.ListOptions
	Schema  schema.GroupVersionResource
}

func (*WatchResourceMock) GroupVersionResource

func (rm *WatchResourceMock) GroupVersionResource() schema.GroupVersionResource

func (*WatchResourceMock) ListOptions

func (rm *WatchResourceMock) ListOptions() metav1.ListOptions

type WatchResources

type WatchResources interface {
	WatchResources() []WatchResource
}

type WatchResourcesMock

type WatchResourcesMock struct{}

func (*WatchResourcesMock) WatchResources

func (rm *WatchResourcesMock) WatchResources() []WatchResource

type Watcher

type Watcher interface {
	AddHandler(ctx context.Context, obj *unstructured.Unstructured)
	ModifyHandler(ctx context.Context, obj *unstructured.Unstructured)
	DeleteHandler(ctx context.Context, obj *unstructured.Unstructured)
}

type WatcherMock

type WatcherMock struct {
	Added   chan *unstructured.Unstructured
	Updated chan *unstructured.Unstructured
	Deleted chan *unstructured.Unstructured
}

func NewWatcherMock

func NewWatcherMock() *WatcherMock

func (*WatcherMock) AddHandler

func (wm *WatcherMock) AddHandler(_ context.Context, obj *unstructured.Unstructured)

func (*WatcherMock) DeleteHandler

func (wm *WatcherMock) DeleteHandler(_ context.Context, obj *unstructured.Unstructured)

func (*WatcherMock) ModifyHandler

func (wm *WatcherMock) ModifyHandler(_ context.Context, obj *unstructured.Unstructured)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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