func NewTestRethinkAPIServer() (server.APIServer, error) { address, err := getTestRethinkAddress() if err != nil { return nil, err } databaseName := uuid.NewWithoutDashes() if err := server.InitDBs(address, databaseName); err != nil { return nil, err } return server.NewRethinkAPIServer(address, databaseName) }
func getRethinkAPIServer(address string, databaseName string) (persist.APIServer, error) { var err error if address == "" { address, err = getRethinkAddress() if err != nil { return nil, err } } if err := persistserver.InitDBs(address, databaseName); err != nil { return nil, err } return persistserver.NewRethinkAPIServer(address, databaseName) }
func getRethinkAPIServer(env *appEnv) (persist.APIServer, error) { if err := persist_server.InitDBs(fmt.Sprintf("%s:28015", env.DatabaseAddress), env.DatabaseName); err != nil { protolion.Errorf("InitDBs returned error: %s", err.Error()) } return persist_server.NewRethinkAPIServer(fmt.Sprintf("%s:28015", env.DatabaseAddress), env.DatabaseName) }
func getRethinkAPIServer(env *appEnv) (persist.APIServer, error) { if err := persistserver.InitDBs(getRethinkAddress(env), env.DatabaseName); err != nil { return nil, err } return persistserver.NewRethinkAPIServer(getRethinkAddress(env), env.DatabaseName) }