flipper-server refactor

Summary:
This changes moves most of the functionality found in flipper-server to flipper-server-core.

flipper-server will mostly be a package that wraps around flipper-server-core. Staying in flipper-server:
- Command line args
- Orchestration to start the necessary servers

Reviewed By: aigoncharov

Differential Revision: D36807087

fbshipit-source-id: f29002c7cc5d08b8c5184fdaaa02ba22562a9f45
This commit is contained in:
Lorenzo Blasa
2022-06-07 02:42:16 -07:00
committed by Facebook GitHub Bot
parent c88e769013
commit 9cc8e4076f
9 changed files with 78 additions and 53 deletions

View File

@@ -0,0 +1,21 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import GKImplementation from './fb-stubs/GK';
let loaded = false;
export function getGatekeepers(username: string): Record<string, boolean> {
if (!loaded) {
// this starts fetching gatekeepers, note that they will only be available on next restart!
GKImplementation.init(username);
loaded = true;
}
return GKImplementation.allGKs();
}