فهرست منبع

Merge pull request #55 from abronan/etcd_tls

Carry #45: Add etcd TLS client code and update README.md.
Alexandre Beslic 9 سال پیش
والد
کامیت
79b8613c95
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      libnetwork/internal/kvstore/kvstore.go

+ 9 - 0
libnetwork/internal/kvstore/kvstore.go

@@ -39,11 +39,20 @@ var (
 
 
 // Config contains the options for a storage client
 // Config contains the options for a storage client
 type Config struct {
 type Config struct {
+	ClientTLS         *ClientTLSConfig
 	TLS               *tls.Config
 	TLS               *tls.Config
 	ConnectionTimeout time.Duration
 	ConnectionTimeout time.Duration
 	Bucket            string
 	Bucket            string
 }
 }
 
 
+// ClientTLSConfig contains data for a Client TLS configuration in the form
+//  the etcd client wants it.  Eventually we'll adapt it for ZK and Consul.
+type ClientTLSConfig struct {
+	CertFile   string
+	KeyFile    string
+	CACertFile string
+}
+
 // Store represents the backend K/V storage
 // Store represents the backend K/V storage
 // Each store should support every call listed
 // Each store should support every call listed
 // here. Or it couldn't be implemented as a K/V
 // here. Or it couldn't be implemented as a K/V