package etcd
import "github.com/google/trillian/util/etcd"
Index ¶
- func NewClient(endpoints []string, dialTimeout time.Duration) (*clientv3.Client, error)
- func NewClientFromString(servers string) (*clientv3.Client, error)
Functions ¶
func NewClient ¶
NewClient returns an etcd Client connecting to the passed in servers' endpoints, with the specified dialing timeout.
The return type belongs to etcd package in Trillian vendor/ directory, which allows external clients/codebases to build an object that matches the Trillian internal implementation (a clientv3.Client built from a different codebase/location, even if it's the same code, wouldn't have the required matching type).
TODO(pavelkalinnikov): Remove this when there is a way to compatibly import the same version of etcd in external codebases. Could Go modules help?
func NewClientFromString ¶
NewClientFromString returns an etcd client, or nil if servers is empty. The servers parameter must be a comma-separated list of etcd server URIs.
Source Files ¶
- Version
- v1.3.7
- Published
- Jan 16, 2020
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 2 hours ago –
Tools for package owners.