route

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HubInterface

type HubInterface interface {
	GetService(hubName string, namespace, name string) (*corev1.Service, bool)
	ListServices(name string) []*corev1.Service
	GetHub(name string) *trafficv1alpha2.Hub
	GetHubGateway(hubName string, forHub string) trafficv1alpha2.HubSpecGateway
	GetAuthorized(name string) string
	Clientset(hubName string) (client.Interface, error)
	ResetClientset(hubName string)
	LoadPortPeer(importHubName string, cluster, namespace, name string, port, bindPort int32) error
	GetPortPeer(importHubName string, cluster, namespace, name string, port int32) (int32, error)
	DeletePortPeer(importHubName string, cluster, namespace, name string, port int32) (int32, error)
	HubReady(hubName string) bool
}

type MappingController

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

func NewMappingController

func NewMappingController(conf MappingControllerConfig) *MappingController

func (*MappingController) Close

func (m *MappingController) Close()

func (*MappingController) SetRoutes

func (m *MappingController) SetRoutes(routes []*trafficv1alpha2.Route)

func (*MappingController) Start

func (m *MappingController) Start(ctx context.Context) error

func (*MappingController) Sync

func (m *MappingController) Sync()

type MappingControllerConfig

type MappingControllerConfig struct {
	Namespace      string
	ExportHubName  string
	ImportHubName  string
	HubInterface   HubInterface
	RouteInterface RouteInterface
	Logger         logr.Logger
}

type RouteController

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

func NewRouteController

func NewRouteController(conf *RouteControllerConfig) *RouteController

func (*RouteController) Run

func (c *RouteController) Run(ctx context.Context) error

func (*RouteController) Sync

func (c *RouteController) Sync(ctx context.Context)

func (*RouteController) UpdateRouteCondition

func (c *RouteController) UpdateRouteCondition(name string, conditions []metav1.Condition)

type RouteControllerConfig

type RouteControllerConfig struct {
	Logger       logr.Logger
	Clientset    client.Interface
	HubInterface HubInterface
	Namespace    string
	SyncFunc     func()
}

type RouteInterface

type RouteInterface interface {
	UpdateRouteCondition(name string, conditions []metav1.Condition)
}

Jump to

Keyboard shortcuts

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