common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultRetryCount for etcd operations
	DefaultRetryCount = 60
	// DefaultIntervalBetweenRetries for etcd failed operations
	DefaultIntervalBetweenRetries = time.Millisecond * 500
	// Bootstrap key
	Bootstrap = "kvdb/bootstrap"
	// DefaultDialTimeout in etcd http requests
	// the maximum amount of time a dial will wait for a connection to setup.
	// 30s is long enough for most of the network conditions.
	DefaultDialTimeout = 30 * time.Second
	// DefaultLockTTL is the ttl for an etcd lock
	DefaultLockTTL = 16
	// DefaultLockRefreshDuration is the time interval for refreshing an etcd lock
	DefaultLockRefreshDuration = 2 * time.Second
)

Variables

This section is empty.

Functions

func TestStart

func TestStart(removeData bool) error

TestStart starts test

func TestStop

func TestStop() error

TestStop stops test

func Version

func Version(uri string, options map[string]string) (string, error)

Version returns the version of the provided etcd server

Types

type EtcdCommon

type EtcdCommon interface {
	// GetAuthInfoFromOptions
	GetAuthInfoFromOptions() (transport.TLSInfo, string, string, error)

	// GetRetryCount
	GetRetryCount() int
}

EtcdCommon defined the common functions between v2 and v3 etcd implementations.

func NewEtcdCommon

func NewEtcdCommon(options map[string]string) EtcdCommon

NewEtcdCommon returns the EtcdCommon interface

type EtcdLock

type EtcdLock struct {
	Done     chan struct{}
	Unlocked bool
	Err      error
	Tag      string
	sync.Mutex
}

EtcdLock combines Mutex and channel

type LockerIDInfo

type LockerIDInfo struct {
	LockerID string
}

LockerIDInfo id of locker

Jump to

Keyboard shortcuts

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