naming_cache

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceInfoHolder

type ServiceInfoHolder struct {
	ServiceInfoMap cache2.ConcurrentMap

	UpdateTimeMap cache2.ConcurrentMap
	// contains filtered or unexported fields
}

func NewServiceInfoHolder

func NewServiceInfoHolder(namespace, cacheDir string, updateCacheWhenEmpty, notLoadCacheAtStart bool) *ServiceInfoHolder

func (*ServiceInfoHolder) DeregisterCallback

func (s *ServiceInfoHolder) DeregisterCallback(serviceName string, clusters string, callbackFunc *func(services []model2.Instance, err error))

func (*ServiceInfoHolder) GetServiceInfo

func (s *ServiceInfoHolder) GetServiceInfo(serviceName, groupName, clusters string) (model2.Service, bool)

func (*ServiceInfoHolder) IsSubscribed

func (s *ServiceInfoHolder) IsSubscribed(serviceName, clusters string) bool

func (*ServiceInfoHolder) ProcessService

func (s *ServiceInfoHolder) ProcessService(service *model2.Service)

func (*ServiceInfoHolder) ProcessServiceJson

func (s *ServiceInfoHolder) ProcessServiceJson(data string)

func (*ServiceInfoHolder) RegisterCallback

func (s *ServiceInfoHolder) RegisterCallback(serviceName string, clusters string, callbackFunc *func(services []model2.Instance, err error))

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 (ed *SubscribeCallback) AddCallbackFunc(serviceName string, clusters string, callbackFunc *func(services []model2.Instance, err error))

func (*SubscribeCallback) IsSubscribed

func (ed *SubscribeCallback) IsSubscribed(serviceName, clusters string) bool

func (*SubscribeCallback) RemoveCallbackFunc

func (ed *SubscribeCallback) RemoveCallbackFunc(serviceName string, clusters string, callbackFunc *func(services []model2.Instance, err error))

func (*SubscribeCallback) ServiceChanged

func (ed *SubscribeCallback) ServiceChanged(cacheKey string, service *model2.Service)

Jump to

Keyboard shortcuts

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