Documentation ¶
Index ¶
- func Exit(code int)
- func Init() (*synccontext.RegisterContext, error)
- func InitWithOptions(opts Options) (*synccontext.RegisterContext, error)
- func MustInit() *synccontext.RegisterContext
- func MustRegister(syncer syncertypes.Base)
- func MustStart()
- func ProConfig() v2.InitConfigPro
- func Register(syncer syncertypes.Base) error
- func Start() error
- func StartAsync() (<-chan struct{}, error)
- func UnmarshalConfig(into interface{}) error
- type ClientHook
- type Interceptor
- type Manager
- type MutateCreatePhysical
- type MutateCreateVirtual
- type MutateDeletePhysical
- type MutateDeleteVirtual
- type MutateGetPhysical
- type MutateGetVirtual
- type MutateUpdatePhysical
- type MutateUpdateVirtual
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init() (*synccontext.RegisterContext, error)
func InitWithOptions ¶
func InitWithOptions(opts Options) (*synccontext.RegisterContext, error)
func MustInit ¶
func MustInit() *synccontext.RegisterContext
func MustRegister ¶
func MustRegister(syncer syncertypes.Base)
func ProConfig ¶ added in v0.5.0
func ProConfig() v2.InitConfigPro
func Register ¶
func Register(syncer syncertypes.Base) error
func StartAsync ¶ added in v0.5.2
func StartAsync() (<-chan struct{}, error)
func UnmarshalConfig ¶ added in v0.5.0
func UnmarshalConfig(into interface{}) error
Types ¶
type ClientHook ¶ added in v0.5.0
type ClientHook interface { syncertypes.Base // Resource is the typed resource (e.g. &corev1.Pod{}) that should get mutated. Resource() client.Object }
ClientHook tells the sdk that this action watches on certain vcluster requests and wants to mutate these. The objects this action wants to watch can be defined through the Resource() function that returns a new object of the type to watch. By implementing the defined interfaces below it is possible to watch on: Create, Update (includes patch requests), Delete and Get requests. This makes it possible to change incoming or outgoing objects on the fly, without the need to completely replace a vanilla vcluster syncer.
type Interceptor ¶ added in v0.5.0
type Interceptor interface { syncertypes.Base // Handler is the handler that will handle the requests delegated by the syncer http.Handler // InterceptionRules returns an rbac style struct which defines what to intercept InterceptionRules() []v2.InterceptorRule }
type Manager ¶
type Manager interface { // Init creates a new plugin context and will block until the // vcluster container instance could be contacted. Init() (*synccontext.RegisterContext, error) // InitWithOptions creates a new plugin context and will block until the // vcluster container instance could be contacted. InitWithOptions(opts Options) (*synccontext.RegisterContext, error) // Register makes sure the syncer will be executed as soon as start // is run. Register(syncer syncertypes.Base) error // Start runs all the registered syncers and will block. It only executes // the functionality if the current vcluster pod is the current leader and // will stop if the pod will lose leader election. Start() error // Start runs all the registered syncers and will not block. It only executes // the functionality if the current vcluster pod is the current leader // You need to exit the plugin when the channel is closed since that means you lost // leader election StartAsync() (<-chan struct{}, error) // UnmarshalConfig retrieves the plugin config from environment and parses it into // the given object. UnmarshalConfig(into interface{}) error // ProConfig returns the pro config retrieved by vCluster.Pro ProConfig() v2.InitConfigPro }
type MutateCreatePhysical ¶ added in v0.5.0
type MutateCreateVirtual ¶ added in v0.5.0
type MutateDeletePhysical ¶ added in v0.5.0
type MutateDeleteVirtual ¶ added in v0.5.0
type MutateGetPhysical ¶ added in v0.5.0
type MutateGetVirtual ¶ added in v0.5.0
type MutateUpdatePhysical ¶ added in v0.5.0
type MutateUpdateVirtual ¶ added in v0.5.0
type Options ¶
type Options struct { // ModifyVirtualManager modifies options for the virtual manager ModifyVirtualManager func(options *ctrlmanager.Options) // ModifyHostManager modifies options for the host manager ModifyHostManager func(options *ctrlmanager.Options) }
Click to show internal directories.
Click to hide internal directories.