naming_cache

package
v0.0.0-...-4e89e2e Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 11 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 sync.Map

	UpdateTimeMap sync.Map
	// 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 []model.Instance, err error))

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 (s *ServiceInfoHolder) RegisterCallback(serviceName string, clusters string, callbackFunc *func(services []model.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 []model.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 []model.Instance, err error))

func (*SubscribeCallback) ServiceChanged

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

Jump to

Keyboard shortcuts

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