Documentation ¶
Index ¶
- Variables
- func Deregister(serviceID string) error
- func GetAllServices() (map[string]*api.AgentService, error)
- func GetAllServicesWithFilter(filter string) (map[string]*api.AgentService, error)
- func GetAllServicesWithFilterOpts(filter string, q *api.QueryOptions) (map[string]*api.AgentService, error)
- func GetHealthServices(service, tag string, q *api.QueryOptions) ([]*api.ServiceEntry, *api.QueryMeta, error)
- func GetHealthServicesMultipleTags(service string, tags []string, q *api.QueryOptions) ([]*api.ServiceEntry, *api.QueryMeta, 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.Newf("haven’t been set up correctly")
)
Functions ¶
func GetAllServices ¶ added in v3.0.32
func GetAllServices() (map[string]*api.AgentService, error)
func GetAllServicesWithFilter ¶ added in v3.0.32
func GetAllServicesWithFilter(filter string) (map[string]*api.AgentService, error)
func GetAllServicesWithFilterOpts ¶ added in v3.0.32
func GetAllServicesWithFilterOpts(filter string, q *api.QueryOptions) (map[string]*api.AgentService, error)
func GetHealthServices ¶ added in v3.0.32
func GetHealthServices(service, tag string, q *api.QueryOptions) ([]*api.ServiceEntry, *api.QueryMeta, error)
func GetHealthServicesMultipleTags ¶ added in v3.0.32
func GetHealthServicesMultipleTags(service string, tags []string, q *api.QueryOptions) ([]*api.ServiceEntry, *api.QueryMeta, error)
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.