session

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 16 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 added in v0.0.2

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

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

func ConvertAPIRouteToModelRoute added in v0.0.2

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

ConvertAPIRouteToModelRoute returns the defined route from the session or the Default

func ConvertAPIStatusToModelRef added in v0.0.2

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 added in v0.0.2

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

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

func ConvertModelRefToAPIStatus added in v0.0.2

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

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

func NewStandaloneReconciler

func NewStandaloneReconciler(c client.Client, m Manipulators) reconcile.Reconciler

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

func RefUpdated added in v0.0.2

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
	Mutators  []model.Mutator
	Revertors []model.Revertor
}

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

func DefaultManipulators added in v0.0.3

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 (*ReconcileSession) Reconcile

func (r *ReconcileSession) Reconcile(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

Jump to

Keyboard shortcuts

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