context

package
v0.21.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cast

func Cast[T any](ctx *SyncContext, pObj, vObj client.Object) (physical T, virtual T, source T, target T)

Cast returns the given objects as types as well as

Types

type EventSource

type EventSource string
const (
	EventSourceHost    EventSource = "Host"
	EventSourceVirtual EventSource = "Virtual"
)

type RegisterContext

type RegisterContext struct {
	Context context.Context

	Config *config.VirtualClusterConfig

	CurrentNamespace       string
	CurrentNamespaceClient client.Client

	VirtualManager  ctrl.Manager
	PhysicalManager ctrl.Manager
}

type SyncContext

type SyncContext struct {
	Context context.Context
	Log     loghelper.Logger

	PhysicalClient client.Client
	VirtualClient  client.Client

	CurrentNamespace       string
	CurrentNamespaceClient client.Client

	EventSource EventSource
}

func ConvertContext

func ConvertContext(registerContext *RegisterContext, logName string) *SyncContext

func (*SyncContext) EventFromHost

func (s *SyncContext) EventFromHost() bool

func (*SyncContext) EventFromVirtual

func (s *SyncContext) EventFromVirtual() bool

Jump to

Keyboard shortcuts

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