consulKit

package
v3.0.53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotSetupError = errorKit.Newf("haven’t been set up correctly")
)

Functions

func Deregister

func Deregister(serviceID string) error

Deregister 服务注销.

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 MustSetUp

func MustSetUp(config *api.Config)

func NewClient

func NewClient(config *api.Config) (*api.Client, error)

NewClient

@param config (1) 不能为 nil;

(2) Address 默认为: "127.0.0.1:8500",Scheme 默认为: "http";
(3) 一般情况下,配置下 Address 即可.

func Register

func Register(service *api.AgentServiceRegistration) error

Register 服务注册.

func RegisterOpts

func RegisterOpts(service *api.AgentServiceRegistration, opts api.ServiceRegisterOpts) error

RegisterOpts 服务注册.

func SetUp

func SetUp(config *api.Config) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL