Пример #1
0
func setUpServer() (*server.Server, store.ObjectStore) {
	log.Println("Setting up test store and test server")
	teststore := store.NewMapStore()
	testserver := server.NewServer(teststore)
	testserver.Init()
	return testserver, teststore
}
Пример #2
0
func main() {
	st := store.NewMapStore()
	s := server.NewServer(st)
	s.Init()
	s.AddResponder(impl.NewOrderAPIResponder(st))
	s.AddResponder(impl.NewInventoryRequestResponder(st))
	s.Open(address)
}