traffictopology

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "traffictopology"

Variables

This section is empty.

Functions

func InitFunc

func InitFunc(mgr manager.Manager) (bool, error)

Types

type EnqueueTP

type EnqueueTP struct {
}

func (*EnqueueTP) Create

func (e *EnqueueTP) Create(createEvent event.CreateEvent, q workqueue.RateLimitingInterface)

func (*EnqueueTP) Delete

func (e *EnqueueTP) Delete(deleteEvent event.DeleteEvent, q workqueue.RateLimitingInterface)

func (*EnqueueTP) Generic

func (e *EnqueueTP) Generic(genericEvent event.GenericEvent, q workqueue.RateLimitingInterface)

func (*EnqueueTP) Update

func (e *EnqueueTP) Update(updateEvent event.UpdateEvent, q workqueue.RateLimitingInterface)

type EnqueueTPByBR

type EnqueueTPByBR struct{}

func (*EnqueueTPByBR) Create

func (*EnqueueTPByBR) Delete

func (*EnqueueTPByBR) Generic

func (*EnqueueTPByBR) Update

type TPControllerAdapter

type TPControllerAdapter struct {
	client.Client
	// contains filtered or unexported fields
}

func NewTPControllerAdapter

func NewTPControllerAdapter(mgr manager.Manager, workloadRegistry workload.Registry) *TPControllerAdapter

func (*TPControllerAdapter) CreateEmployees

func (*TPControllerAdapter) CreateEmployer

func (*TPControllerAdapter) DeleteEmployees

func (*TPControllerAdapter) DeleteEmployer

func (*TPControllerAdapter) EmployeeEventHandler

func (t *TPControllerAdapter) EmployeeEventHandler() handler.EventHandler

EmployeeEventHandler return nil since we don't need BackendRouting's event trigger reconciling TrafficTopology

func (*TPControllerAdapter) EmployeeFed

func (t *TPControllerAdapter) EmployeeFed() bool

func (*TPControllerAdapter) EmployeePredicates

func (t *TPControllerAdapter) EmployeePredicates() predicate.Funcs

func (*TPControllerAdapter) EmployerEventHandler

func (t *TPControllerAdapter) EmployerEventHandler() handler.EventHandler

func (*TPControllerAdapter) EmployerPredicates

func (t *TPControllerAdapter) EmployerPredicates() predicate.Funcs

func (*TPControllerAdapter) GetControllerName

func (t *TPControllerAdapter) GetControllerName() string

func (*TPControllerAdapter) GetCurrentEmployee

func (t *TPControllerAdapter) GetCurrentEmployee(ctx context.Context, employer client.Object) ([]rsFrameController.IEmployee, error)

func (*TPControllerAdapter) GetCurrentEmployer

func (t *TPControllerAdapter) GetCurrentEmployer(ctx context.Context, employer client.Object) ([]rsFrameController.IEmployer, error)

GetCurrentEmployer returns BackendRouting created already, check those in trafficTopology.status check expected whether created already? no need, we made create/delete idempotent

func (*TPControllerAdapter) GetExpectedEmployee

func (t *TPControllerAdapter) GetExpectedEmployee(ctx context.Context, employer client.Object) ([]rsFrameController.IEmployee, error)

func (*TPControllerAdapter) GetExpectedEmployer

func (t *TPControllerAdapter) GetExpectedEmployer(ctx context.Context, employer client.Object) ([]rsFrameController.IEmployer, error)

func (*TPControllerAdapter) GetMaxConcurrent added in v0.1.1

func (t *TPControllerAdapter) GetMaxConcurrent() int

GetMaxConcurrent implements controller.ReconcileOptions.

func (*TPControllerAdapter) GetRateLimiter added in v0.1.1

func (t *TPControllerAdapter) GetRateLimiter() ratelimiter.RateLimiter

GetRateLimiter implements controller.ReconcileOptions.

func (*TPControllerAdapter) GetSelectedEmployeeNames

func (t *TPControllerAdapter) GetSelectedEmployeeNames(ctx context.Context, employer client.Object) ([]string, error)

func (*TPControllerAdapter) NewEmployee

func (t *TPControllerAdapter) NewEmployee() client.Object

func (*TPControllerAdapter) NewEmployer

func (t *TPControllerAdapter) NewEmployer() client.Object

func (*TPControllerAdapter) RecordStatuses

func (t *TPControllerAdapter) RecordStatuses(ctx context.Context, employer client.Object, cudEmployerResults rsFrameController.CUDEmployerResults, cudEmployeeResults rsFrameController.CUDEmployeeResults) error

func (*TPControllerAdapter) UpdateEmployees

func (*TPControllerAdapter) UpdateEmployer

UpdateEmployer won't do update now, since only BackendRouting's name compared TODO what we should do if BackendRouting's spec different

type TPEmployer

type TPEmployer struct {
	BackendRoutingName string
	BackendRouting     v1alpha1.BackendRouting
	Workloads          []v1alpha1.CrossClusterObjectNameReference
}

func (TPEmployer) EmployerEqual

func (b TPEmployer) EmployerEqual(employer rsFrameController.IEmployer) (bool, error)

EmployerEqual only compare name now TODO compare spec, but spec might be changed by BackendRouting controller

func (TPEmployer) GetEmployerId

func (b TPEmployer) GetEmployerId() string

func (TPEmployer) GetEmployerName

func (b TPEmployer) GetEmployerName() string

func (TPEmployer) GetEmployerStatuses

func (b TPEmployer) GetEmployerStatuses() interface{}

type TREmployerStatues

type TREmployerStatues struct {
	BackendRouting v1alpha1.BackendRouting
	Workloads      []v1alpha1.CrossClusterObjectNameReference
}

Jump to

Keyboard shortcuts

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