consul

package
v0.0.0-...-c0a7596 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyProtocol  = "protocol"
	KeyHealthURL = "health_url"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Naming

type Naming struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewNaming

func NewNaming(address string) (*Naming, error)

func (*Naming) Deregister

func (n *Naming) Deregister(serviceID string) error

func (*Naming) Find

func (n *Naming) Find(name string, tags ...string) ([]goim.ServiceRegistration, error)

func (*Naming) Register

func (n *Naming) Register(s goim.ServiceRegistration) error

func (*Naming) Subscribe

func (n *Naming) Subscribe(serviceName string, callback func([]goim.ServiceRegistration)) error

func (*Naming) Unsubscribe

func (n *Naming) Unsubscribe(serviceName string) error

type Watch

type Watch struct {
	Service   string
	Callback  func([]goim.ServiceRegistration)
	WaitIndex uint64
	Quit      chan struct{}
}

Jump to

Keyboard shortcuts

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