Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultTTL use to describe consul update period DefaultTTL = time.Minute // EnableTLS use to enable TSL EnableTLS = true )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consul ¶
type Consul struct {
// contains filtered or unexported fields
}
Consul is an implementation of coodinator
func (*Consul) Deregister ¶
Deregister deregister a service
type TestConsul ¶
type TestConsul struct { GetServicesServices []*spec.Service GetServicesMeta *api.QueryMeta GetServicesError error RegisterError error DeregisterError error }
TestConsul is a help stub for test
func (*TestConsul) Deregister ¶
func (t *TestConsul) Deregister(ctx context.Context, serviceID string) error
Deregister deregister a service which service do we want to deregister
func (*TestConsul) GetServices ¶
func (t *TestConsul) GetServices(ctx context.Context, name string, tag string) ([]*spec.Service, interface{}, error)
GetServices returns some service which services do we want to return
Click to show internal directories.
Click to hide internal directories.