controller

package
v0.0.0-...-571d2a1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeDependencyController

func NewFakeDependencyController(config *rest.Config, dependencyNamespace string, resync time.Duration)

func NewFakeSecretController

func NewFakeSecretController(config *rest.Config, secretNamespace string, resync time.Duration)

func NewFakeTrafficConfigController

func NewFakeTrafficConfigController(config *rest.Config, dependencyNamespace string, resync time.Duration)

Types

type FakeController

type FakeController struct {
	Clientset kubernetes.Interface
	Name      string
	// Informer options
	Namespace    string
	ResyncPeriod time.Duration
	ListOpts     metav1.ListOptions
	Handler      handler.Handler
	Informer     cache.SharedIndexInformer
}

func NewFakeController

func NewFakeController(
	ctx context.Context,
	name string,
	k8sConfig *rest.Config,
	configLoader k8s_utils.ClientConfigLoader,
	namespace string,
	listOpts metav1.ListOptions,
	_ time.Duration,
	handler handler.Handler,
) *FakeController

Creates a new mock controller that can be used for testing This is a mock controller on deployments that uses mock handler.

func (*FakeController) Added

func (s *FakeController) Added(ctx context.Context, obj interface{}, statusChan chan controller.EventProcessStatus)

func (*FakeController) Deleted

func (s *FakeController) Deleted(ctx context.Context, obj interface{}, statusChan chan controller.EventProcessStatus)

func (*FakeController) GetInformer

func (s *FakeController) GetInformer() cache.SharedIndexInformer

func (*FakeController) Status

func (s *FakeController) Status(ctx context.Context, eventStatus controller.EventProcessStatus)

func (*FakeController) Updated

func (s *FakeController) Updated(ctx context.Context, newObj interface{}, oldObj interface{}, statusChan chan controller.EventProcessStatus)

Jump to

Keyboard shortcuts

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