discovery

package
v0.0.0-...-2068963 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToService

func ConnectToService(ctx context.Context, serviceName string, registry Registry) (*grpc.ClientConn, error)

func GenerateInstanceID

func GenerateInstanceID(serviceName string) string

Types

type Registry

type Registry interface {
	Register(ctx context.Context, instanceID, serverName, hostPort string) error
	Deregister(ctx context.Context, instanceID, serviceName string) error
	Discover(ctx context.Context, serviceName string) ([]*consul.ServiceEntry, error)
	HealthCheck(instanceID, serviceName string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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