session

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultRouteHeaderName holds the name of the Header used to route traffic if no Route is provided.
	DefaultRouteHeaderName = "x-workspace-route"

	// RouteStrategyHeader holds the Route Type keyword for a Header based Route strategy.
	RouteStrategyHeader = "header"
)
View Source
const (
	// Finalizer defines the Finalizer name owned by the Session reconciler.
	Finalizer = "finalizers.istio.workspace.session"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Session Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func ConvertAPIRefToModelRef

func ConvertAPIRefToModelRef(ref istiov1alpha1.Ref, namespace string) model.Ref

ConvertAPIRefToModelRef converts a Session.Spec.Ref to a model.Ref.

func ConvertAPIRouteToModelRoute

func ConvertAPIRouteToModelRoute(session *istiov1alpha1.Session) model.Route

ConvertAPIRouteToModelRoute returns the defined route from the session or the Default.

func ConvertAPIStatusToModelRef

func ConvertAPIStatusToModelRef(session istiov1alpha1.Session, ref *model.Ref)

ConvertAPIStatusToModelRef fills the ResourceStatus of a Ref based on the Session.Status.Refs with the same name.

func ConvertAPIStatusesToModelRefs

func ConvertAPIStatusesToModelRefs(session istiov1alpha1.Session) []*model.Ref

ConvertAPIStatusesToModelRefs creates a List of Refs based on the Session.Status.Refs list.

func ConvertModelRefToAPIStatus

func ConvertModelRefToAPIStatus(ref model.Ref, session *istiov1alpha1.Session)

ConvertModelRefToAPIStatus appends/replaces the Ref in the provided Session.Status.Ref list.

func ConvertModelRouteToAPIRoute added in v0.0.7

func ConvertModelRouteToAPIRoute(route model.Route) *istiov1alpha1.Route

ConvertModelRouteToAPIRoute returns Model route as a session Route.

func RefUpdated

func RefUpdated(session istiov1alpha1.Session, ref model.Ref) bool

RefUpdated check if a Ref has been updated compared to current status.

Types

type Manipulators

type Manipulators struct {
	Locators []model.Locator
	Handlers []model.Manipulator
}

Manipulators holds the basic chain of manipulators that the ReconcileSession will use to perform it's actions.

func DefaultManipulators

func DefaultManipulators() Manipulators

DefaultManipulators contains the default config for the reconciler.

type ReconcileSession

type ReconcileSession struct {
	// contains filtered or unexported fields
}

ReconcileSession reconciles a Session object.

func NewStandaloneReconciler

func NewStandaloneReconciler(c client.Client, m Manipulators) *ReconcileSession

NewStandaloneReconciler returns a new reconcile.Reconciler. Primarily used for unit testing outside of the Manager.

func (*ReconcileSession) Reconcile

func (r *ReconcileSession) Reconcile(c context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Session object and makes changes based on the state read and what is in the Session.Spec.

func (ReconcileSession) WatchTypes added in v0.0.8

func (r ReconcileSession) WatchTypes() []client.Object

WatchTypes returns a list of client.Objects to watch for changes.

Jump to

Keyboard shortcuts

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