service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTPRouteReference ResolvedReferenceType = iota
	ConsulServiceReference

	MetaKeyKubeServiceName = "k8s-service-name"
	MetaKeyKubeNS          = "k8s-namespace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendReference

type BackendReference struct {
	HTTPRef    *gw.HTTPBackendRef
	BackendRef *gw.BackendRef
}

func (*BackendReference) Set

func (b *BackendReference) Set(reference interface{})

type BackendResolver

type BackendResolver interface {
	Resolve(ctx context.Context, ref gw.BackendObjectReference) (*ResolvedReference, error)
}

func NewBackendResolver

func NewBackendResolver(logger hclog.Logger, namespace string, mapper common.ConsulNamespaceMapper, client gatewayclient.Client, consul *api.Client) BackendResolver

type ConsulService

type ConsulService struct {
	Namespace string
	Name      string
}

type ResolutionError

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

func NewConsulResolutionError

func NewConsulResolutionError(inner string) ResolutionError

func NewK8sResolutionError

func NewK8sResolutionError(inner string) ResolutionError

func NewResolutionError

func NewResolutionError(inner string) ResolutionError

func (ResolutionError) Error

func (r ResolutionError) Error() string

type ResolutionErrors

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

func NewResolutionErrors

func NewResolutionErrors() *ResolutionErrors

func (*ResolutionErrors) Add

func (r *ResolutionErrors) Add(err ResolutionError)

func (*ResolutionErrors) Empty

func (r *ResolutionErrors) Empty() bool

func (*ResolutionErrors) Flatten

func (*ResolutionErrors) String

func (r *ResolutionErrors) String() string

type ResolvedReference

type ResolvedReference struct {
	Type      ResolvedReferenceType
	Reference *BackendReference
	Consul    *ConsulService
	// contains filtered or unexported fields
}

func NewConsulServiceReference

func NewConsulServiceReference(object client.Object, consul *ConsulService) *ResolvedReference

func (*ResolvedReference) Item

func (r *ResolvedReference) Item() client.Object

type ResolvedReferenceType

type ResolvedReferenceType int

type RouteRule

type RouteRule struct {
	HTTPRule *gw.HTTPRouteRule
	TCPRule  *gw.TCPRouteRule
	TLSRule  *gw.TLSRouteRule
	UDPRule  *gw.UDPRouteRule
}

func NewRouteRule

func NewRouteRule(rule interface{}) RouteRule

type RouteRuleReferenceMap

type RouteRuleReferenceMap map[RouteRule][]ResolvedReference

func (RouteRuleReferenceMap) Add

func (r RouteRuleReferenceMap) Add(rule RouteRule, resolved ResolvedReference)

type ServiceResolutionErrorType

type ServiceResolutionErrorType int
const (
	K8sServiceResolutionErrorType ServiceResolutionErrorType = iota
	ConsulServiceResolutionErrorType
	GenericResolutionErrorType
	NoResolutionErrorType
)

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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