Documentation ¶
Index ¶
- func CompressIfNecessary(data []byte) []byte
- func SelectInstancesWithHealthyProtection(ctx context.Context, result *nacosmodel.ServiceInfo, ...) *nacosmodel.ServiceInfo
- func WarpGRPCPushData(p *PushData)
- func WarpUDPPushData(p *PushData)
- func WrirteNacosErrorResponse(data error, resp *restful.Response)
- func WrirteNacosResponse(data interface{}, resp *restful.Response)
- func WrirteSimpleResponse(data string, code int, resp *restful.Response)
- type InstanceFilter
- type KeyHealthyOnly
- type KeyService
- type NacosDataStorage
- type PushCenter
- type PushData
- type PushType
- type ServiceData
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressIfNecessary ¶
func SelectInstancesWithHealthyProtection ¶
func SelectInstancesWithHealthyProtection(ctx context.Context, result *nacosmodel.ServiceInfo, instances []*nacosmodel.Instance, healthCount int32) *nacosmodel.ServiceInfo
func WarpGRPCPushData ¶
func WarpGRPCPushData(p *PushData)
func WarpUDPPushData ¶
func WarpUDPPushData(p *PushData)
func WrirteNacosErrorResponse ¶
func WrirteNacosErrorResponse(data error, resp *restful.Response)
WrirteNacosErrorResponse .
func WrirteNacosResponse ¶
func WrirteNacosResponse(data interface{}, resp *restful.Response)
WrirteNacosResponse .
func WrirteSimpleResponse ¶
WrirteSimpleResponse .
Types ¶
type InstanceFilter ¶
type InstanceFilter func(ctx context.Context, svcInfo *nacosmodel.ServiceInfo, ins []*nacosmodel.Instance, healthyCount int32) *nacosmodel.ServiceInfo
type KeyHealthyOnly ¶
type KeyHealthyOnly struct{}
type KeyService ¶
type KeyService struct{}
type NacosDataStorage ¶
type NacosDataStorage struct {
// contains filtered or unexported fields
}
func NewNacosDataStorage ¶
func NewNacosDataStorage(cacheMgr *cache.CacheManager) *NacosDataStorage
func (*NacosDataStorage) ListInstances ¶
func (n *NacosDataStorage) ListInstances(ctx context.Context, svc nacosmodel.ServiceKey, clusters []string, filter InstanceFilter) *nacosmodel.ServiceInfo
ListInstances list nacos instances by filter
func (*NacosDataStorage) RunSync ¶
func (n *NacosDataStorage) RunSync()
type PushCenter ¶
type PushCenter interface { AddSubscriber(s Subscriber) RemoveSubscriber(s Subscriber) EnablePush(s Subscriber) bool Type() PushType }
type PushData ¶
type PushData struct { Service *model.Service ServiceInfo *nacosmodel.ServiceInfo UDPData interface{} CompressUDPData []byte GRPCData interface{} CompressGRPCData []byte }
type ServiceData ¶
type ServiceData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.