Partially remove dependency on folly async
Summary: This change isolates the usage of folly async from Flipper. Is now self-contained in Flipper Folly schedulers. Users of Flipper can decide not to use the types defined in that header and implement their own. NOTE: changes are minimal, we are just replacing direct calls to folly event base with a scheduler which simply relays this on to folly. Reviewed By: fabiomassimo Differential Revision: D36052198 fbshipit-source-id: 170d64a324a1f1f100224e2622a59cbac3c8b642
This commit is contained in:
committed by
Facebook GitHub Bot
parent
216c926ca5
commit
ade685c621
@@ -7,8 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <folly/io/async/EventBase.h>
|
||||
#include <memory>
|
||||
#include "FlipperScheduler.h"
|
||||
|
||||
namespace facebook {
|
||||
namespace flipper {
|
||||
@@ -32,35 +32,37 @@ class FlipperSocketProvider {
|
||||
@param endpoint Endpoint to connect to.
|
||||
@param payload Any configuration payload to establish a connection with
|
||||
the specified endpoint.
|
||||
@param eventBase A folly event base used to execute connection operations.
|
||||
@param scheduler An scheduler used to schedule and execute connection
|
||||
operations.
|
||||
*/
|
||||
virtual std::unique_ptr<FlipperSocket> create(
|
||||
FlipperConnectionEndpoint endpoint,
|
||||
std::unique_ptr<FlipperSocketBasePayload> payload,
|
||||
folly::EventBase* eventBase) = 0;
|
||||
Scheduler* scheduler) = 0;
|
||||
/**
|
||||
Create an instance of FlipperSocket.
|
||||
@param endpoint Endpoint to connect to.
|
||||
@param payload Any configuration payload to establish a connection with
|
||||
the specified endpoint.
|
||||
@param eventBase A folly event base used to execute connection operations.
|
||||
@param scheduler An scheduler used to schedule and execute connection
|
||||
operations.
|
||||
@param connectionContextStore A connection context store used for obtaining
|
||||
the certificate used for secure connections.
|
||||
*/
|
||||
virtual std::unique_ptr<FlipperSocket> create(
|
||||
FlipperConnectionEndpoint endpoint,
|
||||
std::unique_ptr<FlipperSocketBasePayload> payload,
|
||||
folly::EventBase* eventBase,
|
||||
Scheduler* scheduler,
|
||||
ConnectionContextStore* connectionContextStore) = 0;
|
||||
|
||||
static std::unique_ptr<FlipperSocket> socketCreate(
|
||||
FlipperConnectionEndpoint endpoint,
|
||||
std::unique_ptr<FlipperSocketBasePayload> payload,
|
||||
folly::EventBase* eventBase);
|
||||
Scheduler* scheduler);
|
||||
static std::unique_ptr<FlipperSocket> socketCreate(
|
||||
FlipperConnectionEndpoint endpoint,
|
||||
std::unique_ptr<FlipperSocketBasePayload> payload,
|
||||
folly::EventBase* eventBase,
|
||||
Scheduler* scheduler,
|
||||
ConnectionContextStore* connectionContextStore);
|
||||
|
||||
static void setDefaultProvider(
|
||||
|
||||
Reference in New Issue
Block a user