goConsulRoundRobin

package module
v0.0.0-...-bbead05 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2015 License: MIT Imports: 6 Imported by: 0

README

goConsulRoundRobin

A library to store healthy service endpoints from consul, round robin through them on request and refresh from consul on a timer

TESTING

$ export CONSUL_IP=test SERVICE_CACHE_TIMEOUT=1000
$ go test -v -cover

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestErr error

TestErr is setable in test scenarios (set CONSUL_IP=testMode) and is what will return on a GetServiceEndpoint call

View Source
var TestURL string

TestURL is setable in test scenarios (set CONSUL_IP=testMode) and is what will return on a GetServiceEndpoint call

Functions

func GetServiceEndpoint

func GetServiceEndpoint(service string) (endpoint string, err error)

GetServiceEndpoint returns a healthy, round robbined service endpoint

Types

This section is empty.

Jump to

Keyboard shortcuts

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