コード例 #1
0
ファイル: server.go プロジェクト: digideskio/etcd
// start prepares and starts server in a new goroutine. It is no longer safe to
// modify a server's fields after it has been sent to Start.
// This function is just used for testing.
func (s *EtcdServer) start() {
	if s.snapCount == 0 {
		log.Printf("etcdserver: set snapshot count to default %d", DefaultSnapCount)
		s.snapCount = DefaultSnapCount
	}
	s.w = wait.New()
	s.done = make(chan struct{})
	// TODO: if this is an empty log, writes all peer infos
	// into the first entry
	go s.run()
}
コード例 #2
0
ファイル: server.go プロジェクト: t-pare/etcd
// Start prepares and starts server in a new goroutine. It is no longer safe to
// modify a Servers fields after it has been sent to Start.
func Start(s *Server) {
	s.w = wait.New()
	s.done = make(chan struct{})
	go s.run()
}
コード例 #3
0
ファイル: server.go プロジェクト: leandroferro/etcd
// Start prepares and starts server in a new goroutine. It is no longer safe to
// modify a server's fields after it has been sent to Start.
func (s *EtcdServer) Start() {
	s.w = wait.New()
	s.done = make(chan struct{})
	go s.run()
}