discover

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcPushCenter

func NewGrpcPushCenter(store *core.NacosDataStorage, sender Sender) (core.PushCenter, error)

Types

type Checker

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

func (*Checker) OnDeleted

func (c *Checker) OnDeleted(value interface{})

OnDeleted callback when cache value deleted

func (*Checker) OnEvent

func (c *Checker) OnEvent(ctx context.Context, value any) error

func (*Checker) OnUpsert

func (c *Checker) OnUpsert(value interface{})

OnUpsert callback when cache value upsert

func (*Checker) PreProcess

func (c *Checker) PreProcess(ctx context.Context, value any) any

type CheckerLeaderSubscriber

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

CheckerLeaderSubscriber

func (*CheckerLeaderSubscriber) OnEvent

func (c *CheckerLeaderSubscriber) OnEvent(ctx context.Context, i interface{}) error

OnEvent event trigger

func (*CheckerLeaderSubscriber) PreProcess

func (c *CheckerLeaderSubscriber) PreProcess(ctx context.Context, value any) any

PreProcess do preprocess logic for event

type ClientConnectionInterceptor

type ClientConnectionInterceptor interface {
	// HandleClientConnect .
	HandleClientConnect(ctx context.Context, client *remote.Client)
	// HandleClientDisConnect .
	HandleClientDisConnect(ctx context.Context, client *remote.Client)
}

ClientConnectionInterceptor

type ConnectionClient

type ConnectionClient struct {
	// ConnID 物理连接唯一ID标识
	ConnID string

	// PublishInstances 这个连接上发布的实例信息
	PublishInstances map[model.ServiceKey]map[string]struct{}
	// contains filtered or unexported fields
}

ConnectionClient .

func (*ConnectionClient) Destroy

func (c *ConnectionClient) Destroy()

func (*ConnectionClient) RangePublishInstance

func (c *ConnectionClient) RangePublishInstance(f func(svc model.ServiceKey, ids []string))

type ConnectionClientManager

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

ConnectionClientManager

func NewConnectionClientManager

func NewConnectionClientManager(inteceptors []ClientConnectionInterceptor) (*ConnectionClientManager, error)

func (*ConnectionClientManager) OnEvent

func (c *ConnectionClientManager) OnEvent(ctx context.Context, a any) error

OnEvent event process logic

func (*ConnectionClientManager) PreProcess

func (cm *ConnectionClientManager) PreProcess(_ context.Context, a any) any

PreProcess do preprocess logic for event

type DiscoverServer

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

func (*DiscoverServer) HandleClientConnect

func (h *DiscoverServer) HandleClientConnect(ctx context.Context, client *remote.Client)

func (*DiscoverServer) HandleClientDisConnect

func (h *DiscoverServer) HandleClientDisConnect(ctx context.Context, client *remote.Client)

func (*DiscoverServer) Initialize

func (h *DiscoverServer) Initialize(option *ServerOption) error

func (*DiscoverServer) ListGRPCHandlers

func (h *DiscoverServer) ListGRPCHandlers() map[string]*remote.RequestHandlerWarrper

type GRPCNotifier

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

func (*GRPCNotifier) Close

func (c *GRPCNotifier) Close() error

func (*GRPCNotifier) IsZombie

func (c *GRPCNotifier) IsZombie() bool

func (*GRPCNotifier) Notify

func (c *GRPCNotifier) Notify(d *core.PushData) error

type GrpcPushCenter

type GrpcPushCenter struct {
	*core.BasePushCenter
	// contains filtered or unexported fields
}

func (*GrpcPushCenter) AddSubscriber

func (p *GrpcPushCenter) AddSubscriber(s core.Subscriber)

func (*GrpcPushCenter) EnablePush

func (p *GrpcPushCenter) EnablePush(s core.Subscriber) bool

func (*GrpcPushCenter) RemoveSubscriber

func (p *GrpcPushCenter) RemoveSubscriber(s core.Subscriber)

func (*GrpcPushCenter) Type

func (p *GrpcPushCenter) Type() core.PushType

type Sender

type Sender func(sub core.Subscriber, data *core.PushData) error

type ServerOption

type ServerOption struct {
	// nacos
	ConnectionManager *remote.ConnectionManager
	Store             *core.NacosDataStorage

	// polaris
	UserSvr           auth.UserServer
	CheckerSvr        auth.StrategyServer
	NamespaceSvr      namespace.NamespaceOperateServer
	DiscoverSvr       service.DiscoverServer
	OriginDiscoverSvr service.DiscoverServer
	HealthSvr         *healthcheck.Server
}

Jump to

Keyboard shortcuts

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