xds

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DiscoverLocalError       = errors.New("Discovery local Pod's host from xds failed, please register service with endpoint to k8s ")
	DiscoverIstiodPodIpError = errors.New("Discovery istiod Pod's ip from xds failed, please register service with endpoint to k8s ")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	PodName         string
	Namespace       string
	IstioAddr       xdsCommon.HostAddr
	DebugPort       string
	LocalIP         string
	LocalDebugMode  bool
	SniffingTimeout time.Duration
}

type WrappedClientImpl

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

func GetXDSWrappedClient

func GetXDSWrappedClient() *WrappedClientImpl

func (*WrappedClientImpl) ChangeInterfaceMap

func (w *WrappedClientImpl) ChangeInterfaceMap(serviceUniqueKey string, add bool) error

ChangeInterfaceMap change the map of serviceUniqueKey -> appname, if add is true, register, else unregister

func (*WrappedClientImpl) GetClusterUpdateIgnoreVersion

func (w *WrappedClientImpl) GetClusterUpdateIgnoreVersion(hostAddr string) resource.ClusterUpdate

func (*WrappedClientImpl) GetDubboGoMetadata

func (w *WrappedClientImpl) GetDubboGoMetadata() (map[string]string, error)

GetDubboGoMetadata get all registered metadata of dubbogo

func (*WrappedClientImpl) GetHostAddrByServiceUniqueKey

func (w *WrappedClientImpl) GetHostAddrByServiceUniqueKey(serviceUniqueKey string) (string, error)

GetHostAddrByServiceUniqueKey todo 1. timeout 2. hostAddr change?

func (*WrappedClientImpl) GetHostAddress

func (w *WrappedClientImpl) GetHostAddress() xdsCommon.HostAddr

func (*WrappedClientImpl) GetIstioPodIP

func (w *WrappedClientImpl) GetIstioPodIP() string

func (*WrappedClientImpl) GetRouterConfig

func (w *WrappedClientImpl) GetRouterConfig(hostAddr string) resource.RouteConfigUpdate

func (*WrappedClientImpl) MatchRoute

func (w *WrappedClientImpl) MatchRoute(routerConfig resource.RouteConfigUpdate, invocation protocol.Invocation) (*resource.Route, error)

func (*WrappedClientImpl) Subscribe

func (w *WrappedClientImpl) Subscribe(svcUniqueName, interfaceName, hostAddr string, lst registry.NotifyListener) error

func (*WrappedClientImpl) UnSubscribe

func (w *WrappedClientImpl) UnSubscribe(svcUniqueName string)

type XDSWrapperClient

type XDSWrapperClient interface {
	Subscribe(svcUniqueName, interfaceName, hostAddr string, lst registry.NotifyListener) error
	UnSubscribe(svcUniqueName string)
	GetRouterConfig(hostAddr string) resource.RouteConfigUpdate
	GetHostAddrByServiceUniqueKey(serviceUniqueKey string) (string, error)
	GetDubboGoMetadata() (map[string]string, error)
	ChangeInterfaceMap(serviceUniqueKey string, add bool) error
	GetClusterUpdateIgnoreVersion(hostAddr string) resource.ClusterUpdate
	GetHostAddress() xdsCommon.HostAddr
	GetIstioPodIP() string
	MatchRoute(routerConfig resource.RouteConfigUpdate, invocation protocol.Invocation) (*resource.Route, error)
}

func NewXDSWrappedClient

func NewXDSWrappedClient(config Config) (XDSWrapperClient, error)

NewXDSWrappedClient create or get singleton xdsWrappedClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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