registry

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery interface {
	GetService(ctx context.Context, serviceName string) ([]*ServiceInstance, error)
	Watch(ctx context.Context, serviceName string) (Watcher, error)
}

type Registrar

type Registrar interface {
	Register(ctx context.Context, svc *ServiceInstance) error
	Deregister(ctx context.Context, svc *ServiceInstance) error
}

type ServiceInstance

type ServiceInstance struct {
	ID        string            `json:"id"`
	Name      string            `json:"name"`
	Version   string            `json:"version"`
	Metadata  map[string]string `json:"metadata"`
	Endpoints []string          `json:"endpoints"`
}

func (*ServiceInstance) Equal

func (si *ServiceInstance) Equal(other any) bool

func (*ServiceInstance) String

func (si *ServiceInstance) String() string

type Watcher

type Watcher interface {
	Next() ([]*ServiceInstance, error)
	Stop() error
}

Jump to

Keyboard shortcuts

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