Documentation ¶
Index ¶
- type ServiceInfoHolder
- func (s *ServiceInfoHolder) DeregisterCallback(serviceName string, clusters string, ...)
- func (s *ServiceInfoHolder) GetServiceInfo(serviceName, groupName, clusters string) (model.Service, bool)
- func (s *ServiceInfoHolder) IsSubscribed(serviceName, clusters string) bool
- func (s *ServiceInfoHolder) ProcessService(service *model.Service)
- func (s *ServiceInfoHolder) ProcessServiceJson(data string)
- func (s *ServiceInfoHolder) RegisterCallback(serviceName string, clusters string, ...)
- func (s *ServiceInfoHolder) StopUpdateIfContain(serviceName, clusters string)
- type SubscribeCallback
- func (ed *SubscribeCallback) AddCallbackFunc(serviceName string, clusters string, ...)
- func (ed *SubscribeCallback) IsSubscribed(serviceName, clusters string) bool
- func (ed *SubscribeCallback) RemoveCallbackFunc(serviceName string, clusters string, ...)
- func (ed *SubscribeCallback) ServiceChanged(cacheKey string, service *model.Service)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceInfoHolder ¶
type ServiceInfoHolder struct { ServiceInfoMap cache.ConcurrentMap UpdateTimeMap cache.ConcurrentMap // contains filtered or unexported fields }
func NewServiceInfoHolder ¶
func NewServiceInfoHolder(namespace, cacheDir string, updateCacheWhenEmpty, notLoadCacheAtStart bool) *ServiceInfoHolder
func (*ServiceInfoHolder) DeregisterCallback ¶
func (*ServiceInfoHolder) GetServiceInfo ¶
func (s *ServiceInfoHolder) GetServiceInfo(serviceName, groupName, clusters string) (model.Service, bool)
func (*ServiceInfoHolder) IsSubscribed ¶
func (s *ServiceInfoHolder) IsSubscribed(serviceName, clusters string) bool
func (*ServiceInfoHolder) ProcessService ¶
func (s *ServiceInfoHolder) ProcessService(service *model.Service)
func (*ServiceInfoHolder) ProcessServiceJson ¶
func (s *ServiceInfoHolder) ProcessServiceJson(data string)
func (*ServiceInfoHolder) RegisterCallback ¶
func (*ServiceInfoHolder) StopUpdateIfContain ¶
func (s *ServiceInfoHolder) StopUpdateIfContain(serviceName, clusters string)
type SubscribeCallback ¶
type SubscribeCallback struct {
// contains filtered or unexported fields
}
func NewSubscribeCallback ¶
func NewSubscribeCallback() *SubscribeCallback
func (*SubscribeCallback) AddCallbackFunc ¶
func (*SubscribeCallback) IsSubscribed ¶
func (ed *SubscribeCallback) IsSubscribed(serviceName, clusters string) bool
func (*SubscribeCallback) RemoveCallbackFunc ¶
func (*SubscribeCallback) ServiceChanged ¶
func (ed *SubscribeCallback) ServiceChanged(cacheKey string, service *model.Service)
Click to show internal directories.
Click to hide internal directories.