Versions in this module Expand all Collapse all v0 v0.3.2 Nov 9, 2018 Changes in this version + const ACLClientType + const ACLManagementType + const AllSegments + const DefaultLockRetryTime + const DefaultLockSessionName + const DefaultLockSessionTTL + const DefaultLockWaitTime + const DefaultMonitorRetryTime + const DefaultSemaphoreKey + const DefaultSemaphoreSessionName + const DefaultSemaphoreSessionTTL + const DefaultSemaphoreWaitTime + const HTTPAddrEnvName + const HTTPAuthEnvName + const HTTPCAFile + const HTTPCAPath + const HTTPClientCert + const HTTPClientKey + const HTTPSSLEnvName + const HTTPSSLVerifyEnvName + const HTTPTLSServerName + const HTTPTokenEnvName + const HealthAny + const HealthCritical + const HealthMaint + const HealthPassing + const HealthWarning + const IntentionDefaultNamespace + const LockFlagValue + const NodeMaint + const SemaphoreFlagValue + const ServiceMaintPrefix + const SessionBehaviorDelete + const SessionBehaviorRelease + var ErrLockConflict = fmt.Errorf("Existing key does not match lock use") + var ErrLockHeld = fmt.Errorf("Lock already held") + var ErrLockInUse = fmt.Errorf("Lock in use") + var ErrLockNotHeld = fmt.Errorf("Lock not held") + var ErrSemaphoreConflict = fmt.Errorf("Existing key does not match semaphore use") + var ErrSemaphoreHeld = fmt.Errorf("Semaphore already held") + var ErrSemaphoreInUse = fmt.Errorf("Semaphore in use") + var ErrSemaphoreNotHeld = fmt.Errorf("Semaphore not held") + var ErrSessionExpired = errors.New("session expired") + func IsRetryableError(err error) bool + func NewHttpClient(transport *http.Transport, tlsConf TLSConfig) (*http.Client, error) + func SetupTLSConfig(tlsConfig *TLSConfig) (*tls.Config, error) + type ACL struct + func (a *ACL) Bootstrap() (string, *WriteMeta, error) + func (a *ACL) Clone(id string, q *WriteOptions) (string, *WriteMeta, error) + func (a *ACL) Create(acl *ACLEntry, q *WriteOptions) (string, *WriteMeta, error) + func (a *ACL) Destroy(id string, q *WriteOptions) (*WriteMeta, error) + func (a *ACL) Info(id string, q *QueryOptions) (*ACLEntry, *QueryMeta, error) + func (a *ACL) List(q *QueryOptions) ([]*ACLEntry, *QueryMeta, error) + func (a *ACL) Replication(q *QueryOptions) (*ACLReplicationStatus, *QueryMeta, error) + func (a *ACL) Update(acl *ACLEntry, q *WriteOptions) (*WriteMeta, error) + type ACLEntry struct + CreateIndex uint64 + ID string + ModifyIndex uint64 + Name string + Rules string + Type string + type ACLReplicationStatus struct + Enabled bool + LastError time.Time + LastSuccess time.Time + ReplicatedIndex uint64 + Running bool + SourceDatacenter string + type Agent struct + func (a *Agent) CheckDeregister(checkID string) error + func (a *Agent) CheckRegister(check *AgentCheckRegistration) error + func (a *Agent) Checks() (map[string]*AgentCheck, error) + func (a *Agent) ConnectAuthorize(auth *AgentAuthorizeParams) (*AgentAuthorize, error) + func (a *Agent) ConnectCALeaf(serviceID string, q *QueryOptions) (*LeafCert, *QueryMeta, error) + func (a *Agent) ConnectCARoots(q *QueryOptions) (*CARootList, *QueryMeta, error) + func (a *Agent) ConnectProxyConfig(proxyServiceID string, q *QueryOptions) (*ConnectProxyConfig, *QueryMeta, error) + func (a *Agent) DisableNodeMaintenance() error + func (a *Agent) DisableServiceMaintenance(serviceID string) error + func (a *Agent) EnableNodeMaintenance(reason string) error + func (a *Agent) EnableServiceMaintenance(serviceID, reason string) error + func (a *Agent) FailTTL(checkID, note string) error + func (a *Agent) ForceLeave(node string) error + func (a *Agent) Join(addr string, wan bool) error + func (a *Agent) Leave() error + func (a *Agent) Members(wan bool) ([]*AgentMember, error) + func (a *Agent) MembersOpts(opts MembersOpts) ([]*AgentMember, error) + func (a *Agent) Metrics() (*MetricsInfo, error) + func (a *Agent) Monitor(loglevel string, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) + func (a *Agent) NodeName() (string, error) + func (a *Agent) PassTTL(checkID, note string) error + func (a *Agent) Reload() error + func (a *Agent) Self() (map[string]map[string]interface{}, error) + func (a *Agent) ServiceDeregister(serviceID string) error + func (a *Agent) ServiceRegister(service *AgentServiceRegistration) error + func (a *Agent) Services() (map[string]*AgentService, error) + func (a *Agent) UpdateACLAgentMasterToken(token string, q *WriteOptions) (*WriteMeta, error) + func (a *Agent) UpdateACLAgentToken(token string, q *WriteOptions) (*WriteMeta, error) + func (a *Agent) UpdateACLReplicationToken(token string, q *WriteOptions) (*WriteMeta, error) + func (a *Agent) UpdateACLToken(token string, q *WriteOptions) (*WriteMeta, error) + func (a *Agent) UpdateTTL(checkID, output, status string) error + func (a *Agent) WarnTTL(checkID, note string) error + type AgentAuthorize struct + Authorized bool + Reason string + type AgentAuthorizeParams struct + ClientCertSerial string + ClientCertURI string + Target string + type AgentCheck struct + CheckID string + Definition HealthCheckDefinition + Name string + Node string + Notes string + Output string + ServiceID string + ServiceName string + Status string + type AgentCheckRegistration struct + ID string + Name string + Notes string + ServiceID string + type AgentMember struct + Addr string + DelegateCur uint8 + DelegateMax uint8 + DelegateMin uint8 + Name string + Port uint16 + ProtocolCur uint8 + ProtocolMax uint8 + ProtocolMin uint8 + Status int + Tags map[string]string + type AgentService struct + Address string + Connect *AgentServiceConnect + CreateIndex uint64 + EnableTagOverride bool + ID string + Kind ServiceKind + Meta map[string]string + ModifyIndex uint64 + Port int + ProxyDestination string + Service string + Tags []string + type AgentServiceCheck struct + Args []string + CheckID string + DeregisterCriticalServiceAfter string + DockerContainerID string + GRPC string + GRPCUseTLS bool + HTTP string + Header map[string][]string + Interval string + Method string + Name string + Notes string + Shell string + Status string + TCP string + TLSSkipVerify bool + TTL string + Timeout string + type AgentServiceChecks []*AgentServiceCheck + type AgentServiceConnect struct + Native bool + Proxy *AgentServiceConnectProxy + type AgentServiceConnectProxy struct + Command []string + Config map[string]interface{} + ExecMode ProxyExecMode + type AgentServiceRegistration struct + Address string + Check *AgentServiceCheck + Checks AgentServiceChecks + Connect *AgentServiceConnect + EnableTagOverride bool + ID string + Kind ServiceKind + Meta map[string]string + Name string + Port int + ProxyDestination string + Tags []string + type AgentToken struct + Token string + type Area struct + ID string + PeerDatacenter string + RetryJoin []string + UseTLS bool + type AreaJoinResponse struct + Address string + Error string + Joined bool + type AutopilotConfiguration struct + CleanupDeadServers bool + CreateIndex uint64 + DisableUpgradeMigration bool + LastContactThreshold *ReadableDuration + MaxTrailingLogs uint64 + ModifyIndex uint64 + RedundancyZoneTag string + ServerStabilizationTime *ReadableDuration + UpgradeVersionTag string + type CAConfig struct + Config map[string]interface{} + CreateIndex uint64 + ModifyIndex uint64 + Provider string + type CARoot struct + Active bool + CreateIndex uint64 + ID string + ModifyIndex uint64 + Name string + RootCertPEM string + type CARootList struct + ActiveRootID string + Roots []*CARoot + TrustDomain string + type Catalog struct + func (c *Catalog) Connect(service, tag string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) + func (c *Catalog) Datacenters() ([]string, error) + func (c *Catalog) Deregister(dereg *CatalogDeregistration, q *WriteOptions) (*WriteMeta, error) + func (c *Catalog) Node(node string, q *QueryOptions) (*CatalogNode, *QueryMeta, error) + func (c *Catalog) Nodes(q *QueryOptions) ([]*Node, *QueryMeta, error) + func (c *Catalog) Register(reg *CatalogRegistration, q *WriteOptions) (*WriteMeta, error) + func (c *Catalog) Service(service, tag string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) + func (c *Catalog) Services(q *QueryOptions) (map[string][]string, *QueryMeta, error) + type CatalogDeregistration struct + Address string + CheckID string + Datacenter string + Node string + ServiceID string + type CatalogNode struct + Node *Node + Services map[string]*AgentService + type CatalogRegistration struct + Address string + Check *AgentCheck + Datacenter string + ID string + Node string + NodeMeta map[string]string + Service *AgentService + SkipNodeUpdate bool + TaggedAddresses map[string]string + type CatalogService struct + Address string + CreateIndex uint64 + Datacenter string + ID string + ModifyIndex uint64 + Node string + NodeMeta map[string]string + ServiceAddress string + ServiceEnableTagOverride bool + ServiceID string + ServiceMeta map[string]string + ServiceName string + ServicePort int + ServiceTags []string + TaggedAddresses map[string]string + type Client struct + func NewClient(config *Config) (*Client, error) + func (c *Client) ACL() *ACL + func (c *Client) Agent() *Agent + func (c *Client) Catalog() *Catalog + func (c *Client) Connect() *Connect + func (c *Client) Coordinate() *Coordinate + func (c *Client) Event() *Event + func (c *Client) Health() *Health + func (c *Client) KV() *KV + func (c *Client) LockKey(key string) (*Lock, error) + func (c *Client) LockOpts(opts *LockOptions) (*Lock, error) + func (c *Client) Operator() *Operator + func (c *Client) PreparedQuery() *PreparedQuery + func (c *Client) Raw() *Raw + func (c *Client) SemaphoreOpts(opts *SemaphoreOptions) (*Semaphore, error) + func (c *Client) SemaphorePrefix(prefix string, limit int) (*Semaphore, error) + func (c *Client) Session() *Session + func (c *Client) Snapshot() *Snapshot + func (c *Client) Status() *Status + type CommonCAProviderConfig struct + LeafCertTTL time.Duration + type Config struct + Address string + Datacenter string + HttpAuth *HttpBasicAuth + HttpClient *http.Client + Scheme string + TLSConfig TLSConfig + Token string + Transport *http.Transport + WaitTime time.Duration + func DefaultConfig() *Config + func DefaultNonPooledConfig() *Config + func (c *Config) GenerateEnv() []string + type Connect struct + func (c *Connect) IntentionCreate(ixn *Intention, q *WriteOptions) (string, *WriteMeta, error) + func (c *Connect) IntentionUpdate(ixn *Intention, q *WriteOptions) (*WriteMeta, error) + func (h *Connect) CAGetConfig(q *QueryOptions) (*CAConfig, *QueryMeta, error) + func (h *Connect) CARoots(q *QueryOptions) (*CARootList, *QueryMeta, error) + func (h *Connect) CASetConfig(conf *CAConfig, q *WriteOptions) (*WriteMeta, error) + func (h *Connect) IntentionCheck(args *IntentionCheck, q *QueryOptions) (bool, *QueryMeta, error) + func (h *Connect) IntentionDelete(id string, q *WriteOptions) (*WriteMeta, error) + func (h *Connect) IntentionGet(id string, q *QueryOptions) (*Intention, *QueryMeta, error) + func (h *Connect) IntentionMatch(args *IntentionMatch, q *QueryOptions) (map[string][]*Intention, *QueryMeta, error) + func (h *Connect) Intentions(q *QueryOptions) ([]*Intention, *QueryMeta, error) + type ConnectProxyConfig struct + Command []string + Config map[string]interface{} + ContentHash string + ExecMode ProxyExecMode + ProxyServiceID string + TargetServiceID string + TargetServiceName string + type ConsulCAProviderConfig struct + PrivateKey string + RootCert string + RotationPeriod time.Duration + func ParseConsulCAConfig(raw map[string]interface{}) (*ConsulCAProviderConfig, error) + type Coordinate struct + func (c *Coordinate) Datacenters() ([]*CoordinateDatacenterMap, error) + func (c *Coordinate) Node(node string, q *QueryOptions) ([]*CoordinateEntry, *QueryMeta, error) + func (c *Coordinate) Nodes(q *QueryOptions) ([]*CoordinateEntry, *QueryMeta, error) + func (c *Coordinate) Update(coord *CoordinateEntry, q *WriteOptions) (*WriteMeta, error) + type CoordinateDatacenterMap struct + AreaID string + Coordinates []CoordinateEntry + Datacenter string + type CoordinateEntry struct + Coord *coordinate.Coordinate + Node string + Segment string + type Event struct + func (e *Event) Fire(params *UserEvent, q *WriteOptions) (string, *WriteMeta, error) + func (e *Event) IDToIndex(uuid string) uint64 + func (e *Event) List(name string, q *QueryOptions) ([]*UserEvent, *QueryMeta, error) + type GaugeValue struct + Labels map[string]string + Name string + Value float32 + type Health struct + func (h *Health) Checks(service string, q *QueryOptions) (HealthChecks, *QueryMeta, error) + func (h *Health) Connect(service, tag string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) + func (h *Health) Node(node string, q *QueryOptions) (HealthChecks, *QueryMeta, error) + func (h *Health) Service(service, tag string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) + func (h *Health) State(state string, q *QueryOptions) (HealthChecks, *QueryMeta, error) + type HealthCheck struct + CheckID string + Definition HealthCheckDefinition + Name string + Node string + Notes string + Output string + ServiceID string + ServiceName string + ServiceTags []string + Status string + type HealthCheckDefinition struct + DeregisterCriticalServiceAfter ReadableDuration + HTTP string + Header map[string][]string + Interval ReadableDuration + Method string + TCP string + TLSSkipVerify bool + Timeout ReadableDuration + type HealthChecks []*HealthCheck + func (c HealthChecks) AggregatedStatus() string + type HttpBasicAuth struct + Password string + Username string + type Intention struct + Action IntentionAction + CreateIndex uint64 + CreatedAt time.Time + DefaultAddr string + DefaultPort int + Description string + DestinationNS string + DestinationName string + ID string + Meta map[string]string + ModifyIndex uint64 + Precedence int + SourceNS string + SourceName string + SourceType IntentionSourceType + UpdatedAt time.Time + func (i *Intention) DestinationString() string + func (i *Intention) SourceString() string + func (i *Intention) String() string + type IntentionAction string + const IntentionActionAllow + const IntentionActionDeny + type IntentionCheck struct + Destination string + Source string + SourceType IntentionSourceType + type IntentionMatch struct + By IntentionMatchType + Names []string + type IntentionMatchType string + const IntentionMatchDestination + const IntentionMatchSource + type IntentionSourceType string + const IntentionSourceConsul + type KV struct + func (k *KV) Acquire(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) + func (k *KV) CAS(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) + func (k *KV) Delete(key string, w *WriteOptions) (*WriteMeta, error) + func (k *KV) DeleteCAS(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) + func (k *KV) DeleteTree(prefix string, w *WriteOptions) (*WriteMeta, error) + func (k *KV) Get(key string, q *QueryOptions) (*KVPair, *QueryMeta, error) + func (k *KV) Keys(prefix, separator string, q *QueryOptions) ([]string, *QueryMeta, error) + func (k *KV) List(prefix string, q *QueryOptions) (KVPairs, *QueryMeta, error) + func (k *KV) Put(p *KVPair, q *WriteOptions) (*WriteMeta, error) + func (k *KV) Release(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) + func (k *KV) Txn(txn KVTxnOps, q *QueryOptions) (bool, *KVTxnResponse, *QueryMeta, error) + type KVOp string + const KVCAS + const KVCheckIndex + const KVCheckNotExists + const KVCheckSession + const KVDelete + const KVDeleteCAS + const KVDeleteTree + const KVGet + const KVGetTree + const KVLock + const KVSet + const KVUnlock + type KVPair struct + CreateIndex uint64 + Flags uint64 + Key string + LockIndex uint64 + ModifyIndex uint64 + Session string + Value []byte + type KVPairs []*KVPair + type KVTxnOp struct + Flags uint64 + Index uint64 + Key string + Session string + Value []byte + Verb KVOp + type KVTxnOps []*KVTxnOp + type KVTxnResponse struct + Errors TxnErrors + Results []*KVPair + type KeyringResponse struct + Datacenter string + Keys map[string]int + NumNodes int + Segment string + WAN bool + type LeafCert struct + CertPEM string + CreateIndex uint64 + ModifyIndex uint64 + PrivateKeyPEM string + SerialNumber string + Service string + ServiceURI string + ValidAfter time.Time + ValidBefore time.Time + type Lock struct + func (l *Lock) Destroy() error + func (l *Lock) Lock(stopCh <-chan struct{}) (<-chan struct{}, error) + func (l *Lock) Unlock() error + type LockOptions struct + Key string + LockTryOnce bool + LockWaitTime time.Duration + MonitorRetries int + MonitorRetryTime time.Duration + Session string + SessionName string + SessionOpts *SessionEntry + SessionTTL string + Value []byte + type MembersOpts struct + Segment string + WAN bool + type MetricsInfo struct + Counters []SampledValue + Gauges []GaugeValue + Points []PointValue + Samples []SampledValue + Timestamp string + type Node struct + Address string + CreateIndex uint64 + Datacenter string + ID string + Meta map[string]string + ModifyIndex uint64 + Node string + TaggedAddresses map[string]string + type Operator struct + func (op *Operator) AreaCreate(area *Area, q *WriteOptions) (string, *WriteMeta, error) + func (op *Operator) AreaDelete(areaID string, q *WriteOptions) (*WriteMeta, error) + func (op *Operator) AreaGet(areaID string, q *QueryOptions) ([]*Area, *QueryMeta, error) + func (op *Operator) AreaJoin(areaID string, addresses []string, q *WriteOptions) ([]*AreaJoinResponse, *WriteMeta, error) + func (op *Operator) AreaList(q *QueryOptions) ([]*Area, *QueryMeta, error) + func (op *Operator) AreaMembers(areaID string, q *QueryOptions) ([]*SerfMember, *QueryMeta, error) + func (op *Operator) AreaUpdate(areaID string, area *Area, q *WriteOptions) (string, *WriteMeta, error) + func (op *Operator) AutopilotCASConfiguration(conf *AutopilotConfiguration, q *WriteOptions) (bool, error) + func (op *Operator) AutopilotGetConfiguration(q *QueryOptions) (*AutopilotConfiguration, error) + func (op *Operator) AutopilotServerHealth(q *QueryOptions) (*OperatorHealthReply, error) + func (op *Operator) AutopilotSetConfiguration(conf *AutopilotConfiguration, q *WriteOptions) error + func (op *Operator) KeyringInstall(key string, q *WriteOptions) error + func (op *Operator) KeyringList(q *QueryOptions) ([]*KeyringResponse, error) + func (op *Operator) KeyringRemove(key string, q *WriteOptions) error + func (op *Operator) KeyringUse(key string, q *WriteOptions) error + func (op *Operator) RaftGetConfiguration(q *QueryOptions) (*RaftConfiguration, error) + func (op *Operator) RaftRemovePeerByAddress(address string, q *WriteOptions) error + func (op *Operator) RaftRemovePeerByID(id string, q *WriteOptions) error + func (op *Operator) SegmentList(q *QueryOptions) ([]string, *QueryMeta, error) + type OperatorHealthReply struct + FailureTolerance int + Healthy bool + Servers []ServerHealth + type PointValue struct + Name string + Points []float32 + type PreparedQuery struct + func (c *PreparedQuery) Create(query *PreparedQueryDefinition, q *WriteOptions) (string, *WriteMeta, error) + func (c *PreparedQuery) Delete(queryID string, q *WriteOptions) (*WriteMeta, error) + func (c *PreparedQuery) Execute(queryIDOrName string, q *QueryOptions) (*PreparedQueryExecuteResponse, *QueryMeta, error) + func (c *PreparedQuery) Get(queryID string, q *QueryOptions) ([]*PreparedQueryDefinition, *QueryMeta, error) + func (c *PreparedQuery) List(q *QueryOptions) ([]*PreparedQueryDefinition, *QueryMeta, error) + func (c *PreparedQuery) Update(query *PreparedQueryDefinition, q *WriteOptions) (*WriteMeta, error) + type PreparedQueryDefinition struct + DNS QueryDNSOptions + ID string + Name string + Service ServiceQuery + Session string + Template QueryTemplate + Token string + type PreparedQueryExecuteResponse struct + DNS QueryDNSOptions + Datacenter string + Failovers int + Nodes []ServiceEntry + Service string + type ProxyExecMode string + const ProxyExecModeDaemon + const ProxyExecModeScript + type QueryDNSOptions struct + TTL string + type QueryDatacenterOptions struct + Datacenters []string + NearestN int + type QueryMeta struct + AddressTranslationEnabled bool + KnownLeader bool + LastContact time.Duration + LastContentHash string + LastIndex uint64 + RequestTime time.Duration + type QueryOptions struct + AllowStale bool + Connect bool + Datacenter string + Near string + NodeMeta map[string]string + RelayFactor uint8 + RequireConsistent bool + Token string + WaitHash string + WaitIndex uint64 + WaitTime time.Duration + func (o *QueryOptions) Context() context.Context + func (o *QueryOptions) WithContext(ctx context.Context) *QueryOptions + type QueryTemplate struct + Regexp string + Type string + type RaftConfiguration struct + Index uint64 + Servers []*RaftServer + type RaftServer struct + Address string + ID string + Leader bool + Node string + ProtocolVersion string + Voter bool + type Raw struct + func (raw *Raw) Query(endpoint string, out interface{}, q *QueryOptions) (*QueryMeta, error) + func (raw *Raw) Write(endpoint string, in, out interface{}, q *WriteOptions) (*WriteMeta, error) + type ReadableDuration time.Duration + func NewReadableDuration(dur time.Duration) *ReadableDuration + func (d *ReadableDuration) Duration() time.Duration + func (d *ReadableDuration) MarshalJSON() ([]byte, error) + func (d *ReadableDuration) String() string + func (d *ReadableDuration) UnmarshalJSON(raw []byte) error + type SampledValue struct + Count int + Labels map[string]string + Max float64 + Mean float64 + Min float64 + Name string + Stddev float64 + Sum float64 + type Semaphore struct + func (s *Semaphore) Acquire(stopCh <-chan struct{}) (<-chan struct{}, error) + func (s *Semaphore) Destroy() error + func (s *Semaphore) Release() error + type SemaphoreOptions struct + Limit int + MonitorRetries int + MonitorRetryTime time.Duration + Prefix string + SemaphoreTryOnce bool + SemaphoreWaitTime time.Duration + Session string + SessionName string + SessionTTL string + Value []byte + type SerfMember struct + Addr net.IP + Build string + Datacenter string + ID string + Name string + Port uint16 + Protocol int + RTT time.Duration + Role string + Status string + type ServerHealth struct + Address string + Healthy bool + ID string + LastContact *ReadableDuration + LastIndex uint64 + LastTerm uint64 + Leader bool + Name string + SerfStatus string + StableSince time.Time + Version string + Voter bool + type ServiceEntry struct + Checks HealthChecks + Node *Node + Service *AgentService + type ServiceKind string + const ServiceKindConnectProxy + const ServiceKindTypical + type ServiceQuery struct + Connect bool + Failover QueryDatacenterOptions + IgnoreCheckIDs []string + Near string + NodeMeta map[string]string + OnlyPassing bool + Service string + Tags []string + type Session struct + func (s *Session) Create(se *SessionEntry, q *WriteOptions) (string, *WriteMeta, error) + func (s *Session) CreateNoChecks(se *SessionEntry, q *WriteOptions) (string, *WriteMeta, error) + func (s *Session) Destroy(id string, q *WriteOptions) (*WriteMeta, error) + func (s *Session) Info(id string, q *QueryOptions) (*SessionEntry, *QueryMeta, error) + func (s *Session) List(q *QueryOptions) ([]*SessionEntry, *QueryMeta, error) + func (s *Session) Node(node string, q *QueryOptions) ([]*SessionEntry, *QueryMeta, error) + func (s *Session) Renew(id string, q *WriteOptions) (*SessionEntry, *WriteMeta, error) + func (s *Session) RenewPeriodic(initialTTL string, id string, q *WriteOptions, doneCh <-chan struct{}) error + type SessionEntry struct + Behavior string + Checks []string + CreateIndex uint64 + ID string + LockDelay time.Duration + Name string + Node string + TTL string + type Snapshot struct + func (s *Snapshot) Restore(q *WriteOptions, in io.Reader) error + func (s *Snapshot) Save(q *QueryOptions) (io.ReadCloser, *QueryMeta, error) + type Status struct + func (s *Status) Leader() (string, error) + func (s *Status) Peers() ([]string, error) + type TLSConfig struct + Address string + CAFile string + CAPath string + CertFile string + InsecureSkipVerify bool + KeyFile string + type TxnError struct + OpIndex int + What string + type TxnErrors []*TxnError + type TxnOp struct + KV *KVTxnOp + type TxnOps []*TxnOp + type TxnResponse struct + Errors TxnErrors + Results TxnResults + type TxnResult struct + KV *KVPair + type TxnResults []*TxnResult + type UserEvent struct + ID string + LTime uint64 + Name string + NodeFilter string + Payload []byte + ServiceFilter string + TagFilter string + Version int + type WriteMeta struct + RequestTime time.Duration + type WriteOptions struct + Datacenter string + RelayFactor uint8 + Token string + func (o *WriteOptions) Context() context.Context + func (o *WriteOptions) WithContext(ctx context.Context) *WriteOptions