registry

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registrar

type Registrar interface {
	// Register a service with the registry.
	Register(ctx context.Context, service *ServiceInstance) error
	// Deregister a service with the registry.
	Deregister(ctx context.Context, service *ServiceInstance) error
}

Registrar is service registrar.

type ServiceInstance

type ServiceInstance struct {
	// ID is the unique instance ID as registered.
	ID string `json:"id"`

	// Name is the service name as registered.
	Name string `json:"name"`

	// Version is the version of the compiled.
	Version string `json:"version"`

	// Metadata is the kv pair metadata associated with the service instance.
	Metadata map[string]string `json:"metadata"`

	// Endpoints are the URLs that are available to the service instance.
	// schema:
	//   http://127.0.0.1:8000?isSecure=false
	//   grpc://127.0.0.1:9000?isSecure=false
	Endpoints []string `json:"endpoints"`
}

ServiceInstance is an instance of a service in a discovery system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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