package etcd

import "github.com/google/trillian/util/etcd"

Index

Functions

func NewClient

func NewClient(endpoints []string, dialTimeout time.Duration) (*clientv3.Client, error)

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

func NewClientFromString(servers string) (*clientv3.Client, error)

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

client.go

Version
v1.3.9
Published
Jun 22, 2020
Platform
js/wasm
Imports
3 packages
Last checked
6 hours ago

Tools for package owners.