registry

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

Registry manages all registered services using a pluggable storage backend No locks needed because it's accessed only by single event queue worker

func NewRegistry

func NewRegistry(store storage.RegistryStore) *Registry

NewRegistry creates a new registry with the given storage backend

func (*Registry) Get

func (r *Registry) Get(key string) (*models.ServiceInfo, bool)

Get retrieves a service by key

func (*Registry) GetAllServices

func (r *Registry) GetAllServices() []*models.ServiceInfo

GetAllServices returns all registered services

func (*Registry) GetByServiceName

func (r *Registry) GetByServiceName(serviceName string) []*models.ServiceInfo

GetByServiceName returns all pods of a service

func (*Registry) GetSubscriberServices

func (r *Registry) GetSubscriberServices(serviceName string) []*models.ServiceInfo

GetSubscriberServices returns all ServiceInfo of subscribers for a given service name

func (*Registry) GetSubscribers

func (r *Registry) GetSubscribers(serviceName string) []string

GetSubscribers returns all subscriber keys for a given service name

func (*Registry) Register

Register adds or updates a service in the registry

func (*Registry) Unregister

func (r *Registry) Unregister(serviceName, podName string) *models.ServiceInfo

Unregister removes a service from the registry

func (*Registry) UpdateHealthStatus

func (r *Registry) UpdateHealthStatus(key string, status models.ServiceStatus) bool

UpdateHealthStatus updates the health status of a service

Jump to

Keyboard shortcuts

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