85aee9b064
This commit separates all etcd related sources (sans a few stubs and config) from the rest of the source tree and makes compilation conditional depending on whether the kvdb_etcd build tag is specified.
34 lines
1.2 KiB
Go
34 lines
1.2 KiB
Go
package kvdb
|
|
|
|
// BoltBackendName is the name of the backend that should be passed into
|
|
// kvdb.Create to initialize a new instance of kvdb.Backend backed by a live
|
|
// instance of bbolt.
|
|
const BoltBackendName = "bdb"
|
|
|
|
// EtcdBackendName is the name of the backend that should be passed into
|
|
// kvdb.Create to initialize a new instance of kvdb.Backend backed by a live
|
|
// instance of etcd.
|
|
const EtcdBackendName = "etcd"
|
|
|
|
// BoltConfig holds bolt configuration.
|
|
type BoltConfig struct {
|
|
NoFreeListSync bool `long:"nofreelistsync" description:"If true, prevents the database from syncing its freelist to disk"`
|
|
}
|
|
|
|
// EtcdConfig holds etcd configuration.
|
|
type EtcdConfig struct {
|
|
Host string `long:"host" description:"Etcd database host."`
|
|
|
|
User string `long:"user" description:"Etcd database user."`
|
|
|
|
Pass string `long:"pass" description:"Password for the database user."`
|
|
|
|
CertFile string `long:"cert_file" description:"Path to the TLS certificate for etcd RPC."`
|
|
|
|
KeyFile string `long:"key_file" description:"Path to the TLS private key for etcd RPC."`
|
|
|
|
InsecureSkipVerify bool `long:"insecure_skip_verify" description:"Whether we intend to skip TLS verification"`
|
|
|
|
CollectStats bool `long:"collect_stats" description:"Whether to collect etcd commit stats."`
|
|
}
|