Documentation ¶
Index ¶
- Variables
- func Deregister(serviceID string) error
- func Discover() (map[string]*api.AgentService, error)
- func DiscoverWithFilter(filter string) (map[string]*api.AgentService, error)
- func DiscoverWithFilterOpts(filter string, q *api.QueryOptions) (map[string]*api.AgentService, error)
- func MustSetUp(config *api.Config)
- func NewClient(config *api.Config) (*api.Client, error)
- func Register(service *api.AgentServiceRegistration) error
- func RegisterOpts(service *api.AgentServiceRegistration, opts api.ServiceRegisterOpts) error
- func SetUp(config *api.Config) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NotSetupError = errorKit.New("Haven’t been set up correctly")
)
Functions ¶
func DiscoverWithFilter ¶
func DiscoverWithFilter(filter string) (map[string]*api.AgentService, error)
DiscoverWithFilter 服务发现.
func DiscoverWithFilterOpts ¶
func DiscoverWithFilterOpts(filter string, q *api.QueryOptions) (map[string]*api.AgentService, error)
DiscoverWithFilterOpts 服务发现.
func NewClient ¶
NewClient
@param config (1) 不能为 nil;
(2) Address 默认为: "127.0.0.1:8500",Scheme 默认为: "http"; (3) 一般情况下,配置下 Address 即可.
func RegisterOpts ¶
func RegisterOpts(service *api.AgentServiceRegistration, opts api.ServiceRegisterOpts) error
RegisterOpts 服务注册.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.