naming_http

package
v2.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultBeatThreadNum = 20

Variables

View Source
var (
	GZIP_MAGIC = []byte("\x1F\x8B")
)

Functions

func IsGzipFile

func IsGzipFile(data []byte) bool

func TryDecompressData

func TryDecompressData(data []byte) string

Types

type BeatReactor

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

func NewBeatReactor

func NewBeatReactor(ctx context.Context, clientCfg constant.ClientConfig, nacosServer *nacos_server.NacosServer) BeatReactor

func (*BeatReactor) AddBeatInfo

func (br *BeatReactor) AddBeatInfo(serviceName string, beatInfo *model.BeatInfo)

func (*BeatReactor) RemoveBeatInfo

func (br *BeatReactor) RemoveBeatInfo(serviceName string, ip string, port uint64)

func (*BeatReactor) SendBeat

func (br *BeatReactor) SendBeat(info *model.BeatInfo) (int64, error)

type NamingHttpProxy

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

NamingHttpProxy ...

func NewNamingHttpProxy

func NewNamingHttpProxy(ctx context.Context, clientCfg constant.ClientConfig, nacosServer *nacos_server.NacosServer,
	serviceInfoHolder *naming_cache.ServiceInfoHolder) (*NamingHttpProxy, error)

NewNamingHttpProxy create naming http proxy

func (*NamingHttpProxy) BatchRegisterInstance added in v2.2.0

func (proxy *NamingHttpProxy) BatchRegisterInstance(serviceName string, groupName string, instances []model.Instance) (bool, error)

func (*NamingHttpProxy) CloseClient

func (proxy *NamingHttpProxy) CloseClient()

func (*NamingHttpProxy) DeregisterInstance

func (proxy *NamingHttpProxy) DeregisterInstance(serviceName string, groupName string, instance model.Instance) (bool, error)

DeregisterInstance ...

func (*NamingHttpProxy) GetServiceList

func (proxy *NamingHttpProxy) GetServiceList(pageNo uint32, pageSize uint32, groupName, namespaceId string, selector *model.ExpressionSelector) (model.ServiceList, error)

GetServiceList ...

func (*NamingHttpProxy) QueryInstancesOfService

func (proxy *NamingHttpProxy) QueryInstancesOfService(serviceName, groupName, clusters string, udpPort int, healthyOnly bool) (*model.Service, error)

QueryInstancesOfService ...

func (*NamingHttpProxy) RegisterInstance

func (proxy *NamingHttpProxy) RegisterInstance(serviceName string, groupName string, instance model.Instance) (bool, error)

RegisterInstance ...

func (*NamingHttpProxy) ServerHealthy

func (proxy *NamingHttpProxy) ServerHealthy() bool

ServerHealthy ...

func (*NamingHttpProxy) Subscribe

func (proxy *NamingHttpProxy) Subscribe(serviceName, groupName, clusters string) (model.Service, error)

Subscribe ...

func (*NamingHttpProxy) Unsubscribe

func (proxy *NamingHttpProxy) Unsubscribe(serviceName, groupName, clusters string) error

Unsubscribe ...

type PushData

type PushData struct {
	PushType    string `json:"type"`
	Data        string `json:"data"`
	LastRefTime int64  `json:"lastRefTime"`
}

type PushReceiver

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

func NewPushReceiver

func NewPushReceiver(ctx context.Context, serviceInfoHolder *naming_cache.ServiceInfoHolder) *PushReceiver

Jump to

Keyboard shortcuts

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