route

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendChangeDetail

type BackendChangeDetail struct {
	Src        string
	Dst        string
	Kind       string
	ApiVersion string
}

type IRoute

type IRoute interface {
	GetRouteObject() client.Object
	AddCanaryRoute(ctx context.Context, forwarding *v1alpha1.BackendForwarding) error
	RemoveCanaryRoute(ctx context.Context) error
	ChangeBackend(ctx context.Context, detail BackendChangeDetail) error
}

type Registry

type Registry interface {
	// SetupWithManger initialize registry with manager.
	SetupWithManger(mgr manager.Manager)
	// Register add a new route store for given gvk
	Register(store Store)
	// Delete delete a route store for given gvk
	Delete(gvk schema.GroupVersionKind)
	// If the gvk is registered and supported by all member clusters, Get returns the backend rest store.
	Get(gvk schema.GroupVersionKind) (Store, error)
}

type Store

type Store interface {
	GroupVersionKind() schema.GroupVersionKind
	// NewObject returns a new instance of the route type
	NewObject() client.Object
	// Wrap get a client.Object and returns a route interface
	Wrap(cluster string, obj client.Object) (IRoute, error)
	// Get returns a wrapped route interface
	Get(ctx context.Context, cluster, namespace, name string) (IRoute, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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