chore(gofmt): Run gofmt

release-0.4
Brian Waldon 2014-01-18 10:10:06 -08:00
parent c0ff8f6026
commit 91fc6aabd2
3 changed files with 31 additions and 31 deletions

24
etcd.go
View File

@ -111,25 +111,25 @@ func main() {
// Create peer server. // Create peer server.
psConfig := server.PeerServerConfig{ psConfig := server.PeerServerConfig{
Name: info.Name, Name: info.Name,
Path: config.DataDir, Path: config.DataDir,
URL: info.RaftURL, URL: info.RaftURL,
BindAddr: info.RaftListenHost, BindAddr: info.RaftListenHost,
SnapshotCount: config.SnapshotCount, SnapshotCount: config.SnapshotCount,
HeartbeatTimeout: time.Duration(config.Peer.HeartbeatTimeout) * time.Millisecond, HeartbeatTimeout: time.Duration(config.Peer.HeartbeatTimeout) * time.Millisecond,
ElectionTimeout: time.Duration(config.Peer.ElectionTimeout) * time.Millisecond, ElectionTimeout: time.Duration(config.Peer.ElectionTimeout) * time.Millisecond,
MaxClusterSize: config.MaxClusterSize, MaxClusterSize: config.MaxClusterSize,
RetryTimes: config.MaxRetryAttempts, RetryTimes: config.MaxRetryAttempts,
CORS: corsInfo, CORS: corsInfo,
} }
ps := server.NewPeerServer(psConfig, &peerTLSConfig, &info.RaftTLS, registry, store, &mb) ps := server.NewPeerServer(psConfig, &peerTLSConfig, &info.RaftTLS, registry, store, &mb)
// Create client server. // Create client server.
sConfig := server.ServerConfig{ sConfig := server.ServerConfig{
Name: info.Name, Name: info.Name,
URL: info.EtcdURL, URL: info.EtcdURL,
BindAddr: info.EtcdListenHost, BindAddr: info.EtcdListenHost,
CORS: corsInfo, CORS: corsInfo,
} }
s := server.New(sConfig, &tlsConfig, &info.EtcdTLS, ps, registry, store, &mb) s := server.New(sConfig, &tlsConfig, &info.EtcdTLS, ps, registry, store, &mb)

View File

@ -40,19 +40,19 @@ type PeerServerConfig struct {
} }
type PeerServer struct { type PeerServer struct {
Config PeerServerConfig Config PeerServerConfig
raftServer raft.Server raftServer raft.Server
server *Server server *Server
httpServer *http.Server httpServer *http.Server
listener net.Listener listener net.Listener
joinIndex uint64 joinIndex uint64
tlsConf *TLSConfig tlsConf *TLSConfig
tlsInfo *TLSInfo tlsInfo *TLSInfo
followersStats *raftFollowersStats followersStats *raftFollowersStats
serverStats *raftServerStats serverStats *raftServerStats
registry *Registry registry *Registry
store store.Store store store.Store
snapConf *snapshotConf snapConf *snapshotConf
closeChan chan bool closeChan chan bool
timeoutThresholdChan chan interface{} timeoutThresholdChan chan interface{}

View File

@ -57,12 +57,12 @@ func New(sConfig ServerConfig, tlsConf *TLSConfig, tlsInfo *TLSInfo, peerServer
TLSConfig: &tlsConf.Server, TLSConfig: &tlsConf.Server,
Addr: sConfig.BindAddr, Addr: sConfig.BindAddr,
}, },
store: store, store: store,
registry: registry, registry: registry,
tlsConf: tlsConf, tlsConf: tlsConf,
tlsInfo: tlsInfo, tlsInfo: tlsInfo,
peerServer: peerServer, peerServer: peerServer,
router: r, router: r,
corsMiddleware: cors, corsMiddleware: cors,
metrics: mb, metrics: mb,
} }