xdsserverv3

package
v1.17.5 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SniTemp = "outbound_.default_.%s.%s.svc.cluster.local"
)

Variables

This section is empty.

Functions

func NewSnapshotCache added in v1.16.0

func NewSnapshotCache(xdsCache cachev3.SnapshotCache, hook CacheHook) cachev3.SnapshotCache

NewSnapshotCache create a XDS SnapshotCache to proxy cachev3.SnapshotCache

Types

type CDSBuilder added in v1.17.3

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

CDSBuilder .

func (*CDSBuilder) Generate added in v1.17.3

func (cds *CDSBuilder) Generate(option *resource.BuildOption) (interface{}, error)

func (*CDSBuilder) GenerateByDirection added in v1.17.3

func (cds *CDSBuilder) GenerateByDirection(option *resource.BuildOption,
	direction corev3.TrafficDirection) ([]types.Resource, error)

func (*CDSBuilder) Init added in v1.17.3

func (cds *CDSBuilder) Init(client *resource.XDSClient, svr service.DiscoverServer)

type CacheHook added in v1.16.0

type CacheHook interface {
	// OnCreateWatch
	OnCreateWatch(request *cachev3.Request, streamState stream.StreamState,
		value chan cachev3.Response)
	// OnCreateDeltaWatch
	OnCreateDeltaWatch(request *cachev3.DeltaRequest, state stream.StreamState,
		value chan cachev3.DeltaResponse)
	// OnFetch
	OnFetch(ctx context.Context, request *cachev3.Request)
}

CacheHook

type EDSBuilder added in v1.17.3

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

EDSBuilder .

func (*EDSBuilder) Generate added in v1.17.3

func (eds *EDSBuilder) Generate(option *resource.BuildOption) (interface{}, error)

func (*EDSBuilder) Init added in v1.17.3

func (eds *EDSBuilder) Init(client *resource.XDSClient, svr service.DiscoverServer)

type LDSBuilder added in v1.17.3

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

LDSBuilder .

func (*LDSBuilder) Generate added in v1.17.3

func (lds *LDSBuilder) Generate(option *resource.BuildOption) (interface{}, error)

func (*LDSBuilder) Init added in v1.17.3

func (lds *LDSBuilder) Init(clien *resource.XDSClient, svr service.DiscoverServer)

type RDSBuilder added in v1.17.3

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

RDSBuilder .

func (*RDSBuilder) Generate added in v1.17.3

func (rds *RDSBuilder) Generate(option *resource.BuildOption) (interface{}, error)

func (*RDSBuilder) Init added in v1.17.3

func (rds *RDSBuilder) Init(client *resource.XDSClient, svr service.DiscoverServer)

type ResourceServer added in v1.17.3

type ResourceServer interface {
	Generate(versionLocal string, registryInfo map[string]map[model.ServiceKey]*resource.ServiceInfo)
}

type XDSServer

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

XDSServer is the xDS server

func (*XDSServer) Generate added in v1.17.3

func (x *XDSServer) Generate(needPush map[string]map[model.ServiceKey]*resource.ServiceInfo)

func (*XDSServer) GetPort

func (x *XDSServer) GetPort() uint32

GetPort 服务注册到北极星中的端口

func (*XDSServer) GetProtocol

func (x *XDSServer) GetProtocol() string

GetProtocol 服务注册到北极星中的协议

func (*XDSServer) Initialize

func (x *XDSServer) Initialize(ctx context.Context, option map[string]interface{},
	apiConf map[string]apiserver.APIConfig) error

Initialize 初始化

func (*XDSServer) OnCreateDeltaWatch added in v1.16.0

func (x *XDSServer) OnCreateDeltaWatch(request *cachev3.DeltaRequest, state stream.StreamState,
	value chan cachev3.DeltaResponse)

OnCreateDeltaWatch before call cachev3.SnapshotCache OnCreateDeltaWatch

func (*XDSServer) OnCreateWatch added in v1.16.0

func (x *XDSServer) OnCreateWatch(request *cachev3.Request, streamState stream.StreamState,
	value chan cachev3.Response)

OnCreateWatch before call cachev3.SnapshotCache CreateWatch

func (*XDSServer) OnFetch added in v1.16.0

func (x *XDSServer) OnFetch(ctx context.Context, request *cachev3.Request)

OnFetch before call cachev3.SnapshotCache OnFetch

func (*XDSServer) Restart

func (x *XDSServer) Restart(option map[string]interface{}, apiConf map[string]apiserver.APIConfig,
	errCh chan error) error

Restart 重启服务

func (*XDSServer) Run

func (x *XDSServer) Run(errCh chan error)

Run 启动运行

func (*XDSServer) Stop

func (x *XDSServer) Stop()

Stop 停止服务

type XdsResourceGenerator added in v1.17.3

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

XdsResourceGenerator is the xDS resource generator

func (*XdsResourceGenerator) Generate added in v1.17.3

func (x *XdsResourceGenerator) Generate(versionLocal string,
	registryInfo map[string]map[model.ServiceKey]*resource.ServiceInfo)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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