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.
psConfig := server.PeerServerConfig{
Name: info.Name,
Path: config.DataDir,
URL: info.RaftURL,
BindAddr: info.RaftListenHost,
SnapshotCount: config.SnapshotCount,
Name: info.Name,
Path: config.DataDir,
URL: info.RaftURL,
BindAddr: info.RaftListenHost,
SnapshotCount: config.SnapshotCount,
HeartbeatTimeout: time.Duration(config.Peer.HeartbeatTimeout) * time.Millisecond,
ElectionTimeout: time.Duration(config.Peer.ElectionTimeout) * time.Millisecond,
MaxClusterSize: config.MaxClusterSize,
RetryTimes: config.MaxRetryAttempts,
CORS: corsInfo,
ElectionTimeout: time.Duration(config.Peer.ElectionTimeout) * time.Millisecond,
MaxClusterSize: config.MaxClusterSize,
RetryTimes: config.MaxRetryAttempts,
CORS: corsInfo,
}
ps := server.NewPeerServer(psConfig, &peerTLSConfig, &info.RaftTLS, registry, store, &mb)
// Create client server.
sConfig := server.ServerConfig{
Name: info.Name,
URL: info.EtcdURL,
Name: info.Name,
URL: info.EtcdURL,
BindAddr: info.EtcdListenHost,
CORS: corsInfo,
CORS: corsInfo,
}
s := server.New(sConfig, &tlsConfig, &info.EtcdTLS, ps, registry, store, &mb)

View File

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

View File

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