Documentation
¶
Index ¶
Constants ¶
View Source
const (
//HTTP is protocol prefix constant
HTTP = "http://"
)
Variables ¶
This section is empty.
Functions ¶
func Deregister ¶
func Deregister(discovery ServiceDiscovery) error
Deregister de-registers instance giving several tries
func Register ¶
func Register(discovery ServiceDiscovery)
Register registers instance giving several tries
Types ¶
type ServiceDiscovery ¶
type ServiceDiscovery interface { Register() error Deregister() error DoWithClient(func(client interface{}) (interface{}, error)) (interface{}, error) }
ServiceDiscovery provides methods to interact with registry (service discovery) service
func NewConsul ¶
func NewConsul(cfg *conf.RpConfig) ServiceDiscovery
NewConsul creates new instance of Consul implementation of ServiceDiscovery based on provided config
Click to show internal directories.
Click to hide internal directories.