translator

package
v0.0.0-...-5a6645a Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const GatewayProxyName = defaults.GatewayProxyName

deprecated, use defaults.GatewayProxyName

Variables

This section is empty.

Functions

func ForEachSource

func ForEachSource(obj ObjectWithMetadata, fn func(source SourceRef) error) error

func GatewayContainsVirtualService

func GatewayContainsVirtualService(gateway *v2.Gateway, virtualService *v1.VirtualService) bool

func ListenerName

func ListenerName(gateway *v2.Gateway) string

func NewDefaultTranslator

func NewDefaultTranslator() *translator

func NewTranslator

func NewTranslator(factories []ListenerFactory) *translator

func VirtualHostName

func VirtualHostName(vs *v1.VirtualService) string

Types

type HttpTranslator

type HttpTranslator struct{}

func (*HttpTranslator) GenerateListeners

func (t *HttpTranslator) GenerateListeners(ctx context.Context, snap *v2.ApiSnapshot, filteredGateways []*v2.Gateway, reports reporter.ResourceReports) []*gloov1.Listener

type ListenerFactory

type ListenerFactory interface {
	GenerateListeners(ctx context.Context, snap *v2.ApiSnapshot, filteredGateways []*v2.Gateway, reports reporter.ResourceReports) []*gloov1.Listener
}

type ObjectWithMetadata

type ObjectWithMetadata interface {
	GetMetadata() *types.Struct
}

type SourceMetadata

type SourceMetadata struct {
	Sources []SourceRef `json:"sources"`
}

func GetSourceMeta

func GetSourceMeta(obj ObjectWithMetadata) (*SourceMetadata, error)

func SourceMetaFromStruct

func SourceMetaFromStruct(s *types.Struct) (*SourceMetadata, error)

type SourceRef

type SourceRef struct {
	core.ResourceRef
	ResourceKind       string `json:"kind"`
	ObservedGeneration int64  `json:"observedGeneration"`
}

type TcpTranslator

type TcpTranslator struct{}

func (*TcpTranslator) GenerateListeners

func (t *TcpTranslator) GenerateListeners(ctx context.Context, snap *v2.ApiSnapshot, filteredGateways []*v2.Gateway, reports reporter.ResourceReports) []*gloov1.Listener

type Translator

type Translator interface {
	Translate(ctx context.Context, proxyName, namespace string, snap *v2.ApiSnapshot, filteredGateways v2.GatewayList) (*gloov1.Proxy, reporter.ResourceReports)
}

Jump to

Keyboard shortcuts

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