consulimpl

package
v0.0.0-...-271fa43 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 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 defines a Consul based service registry

func NewRegistry

func NewRegistry(addr string) (*Registry, error)

NewRegistry creates a new consul based registry instance

func (*Registry) Deregister

func (r *Registry) Deregister(ctx context.Context, instanceID string, serviceName string) error

Deregister removes a service instance record from the registry.

func (*Registry) Register

func (r *Registry) Register(ctx context.Context, instanceID string, serviceName string, hostPort string) error

Register creates a service instance record in the registry.

func (*Registry) ReportHealthyState

func (r *Registry) ReportHealthyState(ctx context.Context, instanceID string, serviceName string) error

ReportHealthyState is a push mechanism for reporting the healthy state to the registry.

func (*Registry) ServiceAddresses

func (r *Registry) ServiceAddresses(ctx context.Context, serviceName string) ([]string, error)

ServiceAddresses returns the list of addresses of active instances of the given service.

Jump to

Keyboard shortcuts

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