v1

package
v0.0.0-...-dce2b97 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorDuplicateDebugRoute = errors.New("duplicate debug route")
)

Functions

func BuildClientBeat

func BuildClientBeat(req *restful.Request) (*model.ClientBeat, error)

func BuildInstance

func BuildInstance(namespace string, req *restful.Request) (*model.Instance, error)

func NewUDPPushCenter

func NewUDPPushCenter(store *core.NacosDataStorage) (core.PushCenter, error)

func ParseJsonBody

func ParseJsonBody(req *restful.Request, value interface{}) error

ParseJsonBody parse http body as json object

func ParseQueryParams

func ParseQueryParams(req *restful.Request) map[string]string

ParseQueryParams 解析并获取HTTP的query params

func RegistryDebugRoute

func RegistryDebugRoute(name string, rb func(*restful.WebService) *restful.RouteBuilder) error

func WithAuthSvr

func WithAuthSvr(userSvr auth.UserServer, checkerSvr auth.StrategyServer) option

func WithConnLimitConfig

func WithConnLimitConfig(connLimitConfig *connlimit.Config) option

func WithDiscoverSvr

func WithDiscoverSvr(discoverSvr service.DiscoverServer) option

func WithHealthSvr

func WithHealthSvr(healthSvr *healthcheck.Server) option

func WithNamespaceSvr

func WithNamespaceSvr(namespaceSvr namespace.NamespaceOperateServer) option

func WithTLS

func WithTLS(tlsInfo *secure.TLSInfo) option

Types

type Handler

type Handler struct {
	Request  *restful.Request
	Response *restful.Response
}

Handler HTTP请求/回复处理器

func (*Handler) ParseHeaderContext

func (h *Handler) ParseHeaderContext() context.Context

ParseHeaderContext 将http请求header中携带的用户信息提取出来

type NacosV1Server

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

NacosV1Server HTTP API服务器

func NewNacosV1Server

func NewNacosV1Server(store *core.NacosDataStorage, options ...option) *NacosV1Server

func (*NacosV1Server) AddServiceAccess

func (n *NacosV1Server) AddServiceAccess(ws *restful.WebService)

func (*NacosV1Server) DeRegisterInstance

func (n *NacosV1Server) DeRegisterInstance(req *restful.Request, rsp *restful.Response)

func (*NacosV1Server) GetAuthServer

func (n *NacosV1Server) GetAuthServer() (*restful.WebService, error)

func (*NacosV1Server) GetClientServer

func (n *NacosV1Server) GetClientServer() (*restful.WebService, error)

func (*NacosV1Server) GetDebugServer

func (n *NacosV1Server) GetDebugServer() (*restful.WebService, error)

func (*NacosV1Server) GetProtocol

func (h *NacosV1Server) GetProtocol() string

GetProtocol 获取Server的协议

func (*NacosV1Server) Heartbeat

func (n *NacosV1Server) Heartbeat(req *restful.Request, rsp *restful.Response)

func (*NacosV1Server) Initialize

func (h *NacosV1Server) Initialize(_ context.Context, option map[string]interface{}, port uint32,
	apiConf map[string]apiserver.APIConfig) error

Initialize 初始化HTTP API服务器

func (*NacosV1Server) ListInstances

func (n *NacosV1Server) ListInstances(req *restful.Request, rsp *restful.Response)

func (*NacosV1Server) ListServices

func (n *NacosV1Server) ListServices(req *restful.Request, rsp *restful.Response)

func (*NacosV1Server) Login

func (n *NacosV1Server) Login(req *restful.Request, rsp *restful.Response)

func (*NacosV1Server) RegisterInstance

func (n *NacosV1Server) RegisterInstance(req *restful.Request, rsp *restful.Response)

func (*NacosV1Server) Run

func (h *NacosV1Server) Run(errCh chan error)

Run 启动HTTP API服务器

func (*NacosV1Server) ServerHealthStatus

func (n *NacosV1Server) ServerHealthStatus(req *restful.Request, rsp *restful.Response)

func (*NacosV1Server) Stop

func (h *NacosV1Server) Stop()

Stop shutdown server

func (*NacosV1Server) UpdateInstance

func (n *NacosV1Server) UpdateInstance(req *restful.Request, rsp *restful.Response)

type UDPAckPacket

type UDPAckPacket struct {
	Type        string
	LastRefTime int64
	Data        string
}

type UDPNotifier

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

func (*UDPNotifier) Close

func (c *UDPNotifier) Close() error

func (*UDPNotifier) IsZombie

func (c *UDPNotifier) IsZombie() bool

func (*UDPNotifier) Notify

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

type UdpPushCenter

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

func (*UdpPushCenter) AddSubscriber

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

func (*UdpPushCenter) EnablePush

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

func (*UdpPushCenter) RemoveSubscriber

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

func (*UdpPushCenter) Type

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

Jump to

Keyboard shortcuts

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