validator

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayValidator

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

GatewayValidator is responsible for taking a provided v1beta1.Gateway and deriving a state.GatewayState from it. Ultimately, this GatewayState is what makes up the Status on the Kubernetes Gateway resource and stores information about currently bound Routes.

func NewGatewayValidator

func NewGatewayValidator(client gatewayclient.Client) *GatewayValidator

func (*GatewayValidator) Validate

func (g *GatewayValidator) Validate(ctx context.Context, gateway *gwv1beta1.Gateway, service *core.Service) (*state.GatewayState, error)

type Route

type Route interface {
	client.Object
	schema.ObjectKind
}

all kubernetes routes implement the following two interfaces

type RouteValidator

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

RouteValidator is responsible for taking a provided v1alpha2.HTTPRoute or v1alpha2.TCPRoute and deriving a state.RouteState from it. Ultimately, this RouteState is what makes up the Status on the Kubernetes Route resource and holds any intermediate state resolved from remote object references (i.e. resolved Consul services from `backendRefs` values).

func NewRouteValidator

func NewRouteValidator(resolver service.BackendResolver, client gatewayclient.Client) *RouteValidator

func (*RouteValidator) Validate

func (r *RouteValidator) Validate(ctx context.Context, route Route) (*state.RouteState, error)

Jump to

Keyboard shortcuts

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