Documentation
¶
Index ¶
Constants ¶
View Source
const ( SERVICE_STATUS_UNDEFINED int8 = iota + 1 SERVICE_STATUS_PASSING SERVICE_STATUS_WARNING SERVICE_STATUS_CRITICAL )
View Source
const RegistryPrefix = "registry"
RegistryPrefix represents the name of the meta field of config
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckOptions ¶
type CheckOptions struct {
Interval string
Timeout string
HTTP string
TCP string
TTL string
DeregisterAfter string
}
CheckOptions defines sevice healthcheck
type Discovery ¶
type Discovery interface {
Lookup(*Filter) ([]Service, error)
Register(ServiceOptions) error
Deregister(string) error
}
Descovery service functionality definition
type KV ¶
type KV interface {
Get(string) (string, error)
Set(key, value string) error
List(prefix string) (map[string]string, error)
Delete(string) error
}
KV is key value storage functionality definition
type Service ¶
type Service struct {
ID string
Name string
Datacenter string
Address string
Port int
Tags []string
Status int8
}
Service config definition
type ServiceOptions ¶
type ServiceOptions struct {
ID string
Name string
Address string
Tags []string
Check CheckOptions
}
ServiceOptions defines proxy sevice object
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
bind
command
|
|
|
discovery
command
|
|
|
grpc
command
|
|
|
http_client
command
|
|
|
net
|
|
Click to show internal directories.
Click to hide internal directories.