v1

package
v1.17.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGrpcOperator

func ParseGrpcOperator(ctx context.Context) string

ParseGrpcOperator 构造请求源

Types

type DiscoverServer

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

func NewDiscoverServer

func NewDiscoverServer(options ...Option) *DiscoverServer

func (*DiscoverServer) BatchDelHeartbeat added in v1.17.0

BatchDelHeartbeat 批量删除心跳记录

func (*DiscoverServer) BatchGetHeartbeat added in v1.17.0

BatchGetHeartbeat 批量获取心跳记录

func (*DiscoverServer) BatchHeartbeat added in v1.17.0

BatchHeartbeat 批量上报心跳

func (*DiscoverServer) DeregisterInstance

func (g *DiscoverServer) DeregisterInstance(
	ctx context.Context, in *apiservice.Instance) (*apiservice.Response, error)

DeregisterInstance 反注册服务实例

func (*DiscoverServer) Discover

Discover 统一发现接口

func (*DiscoverServer) Heartbeat

Heartbeat 上报心跳

func (*DiscoverServer) RegisterInstance

func (g *DiscoverServer) RegisterInstance(ctx context.Context, in *apiservice.Instance) (*apiservice.Response, error)

RegisterInstance 注册服务实例

func (*DiscoverServer) ReportClient

func (g *DiscoverServer) ReportClient(ctx context.Context, in *apiservice.Client) (*apiservice.Response, error)

ReportClient 客户端上报

type Option

type Option func(s *DiscoverServer)

func WithAllowAccess

func WithAllowAccess(f func(method string) bool) Option

func WithEnterRateLimit

func WithEnterRateLimit(f func(ip string, method string) uint32) Option

func WithHealthCheckerServer

func WithHealthCheckerServer(svr *healthcheck.Server) Option

func WithNamingServer

func WithNamingServer(svr service.DiscoverServer) Option

Jump to

Keyboard shortcuts

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