Beispiel #1
0
func startNetwork() error {
	if e := C.fdb_setup_network(); e != 0 {
		return Error(e)
	}

	go C.fdb_run_network()

	networkStarted = true

	return nil
}
Beispiel #2
0
func startNetwork() error {
	if e := C.fdb_setup_network(); e != 0 {
		return Error{int(e)}
	}

	go func() {
		e := C.fdb_run_network()
		if e != 0 {
			log.Printf("Unhandled error in FoundationDB network thread: %v (%v)\n", C.GoString(C.fdb_get_error(e)), e)
		}
	}()

	networkStarted = true

	return nil
}