registry

package
v0.0.0-...-8a5cab9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Provider Provider
	Host     string
	Port     string
}

Config for Registry

type Provider

type Provider int

Provider enum

const (
	// Consul provider
	Consul Provider = iota
)

type Registry

type Registry interface {
	Register(id string, name string, port int, tags ...string) error
	DeRegister(string) error
}

Registry interface for extend

func NewConsulRegistry

func NewConsulRegistry(c Config) (Registry, error)

NewConsulRegistry returns a registryClient interface for given consul address

func NewRegistry

func NewRegistry(cfg Config) (Registry, error)

NewRegistry returns Registry via provider, e.g. ConsulRegistry

Jump to

Keyboard shortcuts

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