You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be hard to create custom builds that don't have every supported backend built in? The binary is getting quite large and grows with each new backend added. With a single backend like etcd it would probably be quite small though. Even if the binaries weren't published it would be nice if there was a simple way (and instructions) to make your own build.
The text was updated successfully, but these errors were encountered:
replace the file "backends/client.go" with the following code (for etcd only).
1package backends
23import (
4"errors"5"strings"67"github.com/kelseyhightower/confd/backends/etcd"8"github.com/kelseyhightower/confd/log"9 )
1011// The StoreClient interface is implemented by objects that can retrieve12// key/value pairs from a backend store.13typeStoreClientinterface {
14GetValues(keys []string) (map[string]string, error)
15WatchPrefix(prefixstring, keys []string, waitIndexuint64, stopChanchanbool) (uint64, error)
16 }
1718// New is used to create a storage client based on our configuration.19funcNew(configConfig) (StoreClient, error) {
20ifconfig.Backend=="" {
21config.Backend="etcd"22 }
23backendNodes:=config.BackendNodes24log.Info("Backend nodes set to "+strings.Join(backendNodes, ", "))
25switch config.Backend {
26case"etcd":
27// Create the etcd client upfront and use it for the life of the process.28// The etcdClient is an http.Client and designed to be reused.29returnetcd.NewEtcdClient(backendNodes, config.ClientCert, config.ClientKey, config.ClientCaKeys, config.BasicAuth, config.Username, config.Password)
30 }
31returnnil, errors.New("Invalid backend")
32 }
Hmm, I tried to build one with just env, etcd and redis support and the binary is still 18M so I guess the savings are really not what I expected.. Probably not worthwhile then. Thanks for the help!
Would it be hard to create custom builds that don't have every supported backend built in? The binary is getting quite large and grows with each new backend added. With a single backend like etcd it would probably be quite small though. Even if the binaries weren't published it would be nice if there was a simple way (and instructions) to make your own build.
The text was updated successfully, but these errors were encountered: