Commit e6171978 authored by Daniel Dao's avatar Daniel Dao

storage/etcd: document struct tag in code

This explicitly adds struct tags for etcd storage instead of implicitly
depends on yaml/json config serialization.
parent a2188beb
...@@ -16,10 +16,10 @@ var ( ...@@ -16,10 +16,10 @@ var (
// SSL represents SSL options for etcd databases. // SSL represents SSL options for etcd databases.
type SSL struct { type SSL struct {
ServerName string ServerName string `json:"serverName" yaml:"serverName"`
CAFile string CAFile string `json:"caFile" yaml:"caFile"`
KeyFile string KeyFile string `json:"keyFile" yaml:"keyFile"`
CertFile string CertFile string `json:"certFile" yaml:"certFile"`
} }
// Etcd options for connecting to etcd databases. // Etcd options for connecting to etcd databases.
...@@ -27,11 +27,11 @@ type SSL struct { ...@@ -27,11 +27,11 @@ type SSL struct {
// configure an etcd namespace either via Namespace field or using `etcd grpc-proxy // configure an etcd namespace either via Namespace field or using `etcd grpc-proxy
// --namespace=<prefix>` // --namespace=<prefix>`
type Etcd struct { type Etcd struct {
Endpoints []string Endpoints []string `json:"endpoints" yaml:"endpoints"`
Namespace string Namespace string `json:"namespace" yaml:"namespace"`
Username string Username string `json:"username" yaml:"username"`
Password string Password string `json:"password" yaml:"password"`
SSL SSL SSL SSL `json:"ssl" yaml:"ssl"`
} }
// Open creates a new storage implementation backed by Etcd // Open creates a new storage implementation backed by Etcd
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment