session

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 31 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"
)
View Source
const (
	ValidationReason = "Validation"
)

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

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

ConvertModelRouteToAPIRoute returns Model route as a session Route.

func TargetFound added in v0.4.0

func TargetFound(store model.LocatorStatusStore) (string, error)

Types

type InstrumentedClient added in v0.5.0

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

func NewInstrumentedClient added in v0.5.0

func NewInstrumentedClient(c client.Client) *InstrumentedClient

func (*InstrumentedClient) Create added in v0.5.0

func (i *InstrumentedClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (*InstrumentedClient) Delete added in v0.5.0

func (i *InstrumentedClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

func (*InstrumentedClient) DeleteAllOf added in v0.5.0

func (i *InstrumentedClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

func (*InstrumentedClient) Get added in v0.5.0

func (*InstrumentedClient) List added in v0.5.0

func (*InstrumentedClient) Patch added in v0.5.0

func (i *InstrumentedClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

func (*InstrumentedClient) RESTMapper added in v0.5.0

func (i *InstrumentedClient) RESTMapper() meta.RESTMapper

func (*InstrumentedClient) Scheme added in v0.5.0

func (i *InstrumentedClient) Scheme() *runtime.Scheme

func (*InstrumentedClient) Status added in v0.5.0

func (*InstrumentedClient) Update added in v0.5.0

func (i *InstrumentedClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

type InstrumentedStatusWriter added in v0.5.0

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

func (*InstrumentedStatusWriter) Patch added in v0.5.0

func (*InstrumentedStatusWriter) Update added in v0.5.0

type Manipulators

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

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, validators ...Validator) *ReconcileSession

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

func (*ReconcileSession) Reconcile

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

type Validator added in v0.4.0

type Validator func(store model.LocatorStatusStore) (string, error)

Validator returns a string of Type and a possible error.

func DefaultValidators added in v0.4.0

func DefaultValidators() []Validator

func ResourceFound added in v0.4.0

func ResourceFound(kind string) Validator

Jump to

Keyboard shortcuts

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