Documentation ¶
Index ¶
- Constants
- func DiscardBody(resp *http.Response) error
- func DoRequestWithDiscoveryService(httpClient *http.Client, host, path, username, password, payload string) (resp *http.Response, endpoint string, err error)
- func GetHTTPClient() *http.Client
- type ClientWrapper
- type HealthWrapper
- type IClient
- type IHealth
- type Resolver
- type Services
Constants ¶
View Source
const (
DefaultCacheInvalidationTimeout = 10
)
DefaultCacheInvalidationTimeout for updating instances
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientWrapper ¶
ClientWrapper for consul api.Client
type HealthWrapper ¶
type HealthWrapper struct {
// contains filtered or unexported fields
}
HealthWrapper for consul api.Health
func (*HealthWrapper) Service ¶
func (hw *HealthWrapper) Service(service, tag string, passingOnly bool, q *api.QueryOptions) ([]*api.ServiceEntry, *api.QueryMeta, error)
Service function wrapper
type IHealth ¶
type IHealth interface {
Service(service, tag string, passingOnly bool, q *api.QueryOptions) ([]*api.ServiceEntry, *api.QueryMeta, error)
}
IHealth interface
type Resolver ¶
type Resolver struct { LastUpdateTimestamp int64 // contains filtered or unexported fields }
Resolver for discovery service
func NewResolver ¶
NewResolver for discovery client
func (*Resolver) GetNodesFromConsul ¶
func (r *Resolver) GetNodesFromConsul(service string) (entries []*api.ServiceEntry)
GetNodesFromConsul get service nodes form service discovery
type Services ¶
Services for discovery service
func NewServices ¶
NewServices constructor
func (*Services) GetEndpoint ¶
GetEndpoint by service name
func (*Services) UpdateInstances ¶
UpdateInstances get service instances from service discovery
Click to show internal directories.
Click to hide internal directories.