Versions in this module Expand all Collapse all v1 v1.4.0 Jan 2, 2024 Changes in this version + const SessionTTL + func CatalogServicesList(address string) (map[string][]string, error) + func GetHealthNode(address string, service string) (nodes []string) + func NewHTTPError(code int) error + type AcquireReq struct + Acquire string + type AgentCheck struct + CheckID string + Name string + Namespace string + Node string + Notes string + Output string + ServiceID string + ServiceName string + Status string + Type string + type Client struct + func BuildWithOption(opts ...Option) *Client + func (c *Client) AcquireLock(name string, id string) (bool, error) + func (c *Client) CatalogGetService(name string) (meta.Service, error) + func (c *Client) CatalogListServices() ([]meta.Service, error) + func (c *Client) Client() *consul.Client + func (c *Client) CreateSession(name string) (string, error) + func (c *Client) DeleteSession(id string) error + func (c *Client) RefreshSession(id string) error + func (c *Client) ReleaseLock(name string, id string) (bool, error) + func (c *Client) ServiceDeregister(id string) error + func (c *Client) ServiceRegister(parm consul.AgentServiceRegistration) error + type ConsulRegistReq struct + Address string + ID string + Name string + Port int + Tags []string + type CreateSessionReq struct + Name string + TTL string + type Option func(*Parm) + func WithAddress(address []string) Option + func WithAllowStale(as bool) Option + func WithConfig(cfg *consul.Config) Option + func WithQueryOption(opt *consul.QueryOptions) Option + func WithTLS(tls *tls.Config) Option + func WithTimeOut(timeout time.Duration) Option + func WithToken(token string) Option + type Parm struct + Addrs []string + type RenewSessionRes struct + CreateIndex string + ID string + ModifyIndex string + Name string + TTL string + type ServiceHealthCheck struct + ID string + Name string + Node string + ServiceID string + ServiceName string + Status string + type ServiceHealthRes struct + Checks []ServiceHealthCheck + Service ServiceHealthService + type ServiceHealthService struct + Address string + ID string + Service string