Interface ControlClientPool
-
- All Known Implementing Classes:
MapControlClientPool
@ThreadSafe public interface ControlClientPoolA pool of control clients that brokers incoming SDK harness connections (in the form ofInstructionRequestHandlers.Incoming instruction handlers usually come from the control plane gRPC service. Typical use:
// Within owner of the pool, who may or may not own the control plane server as well ControlClientPool pool = ... FnApiControlClientPoolService service = FnApiControlClientPoolService.offeringClientsToSink(pool.getSink(), headerAccessor) // Incoming gRPC control connections will now be added to the client pool. // Within code that interacts with the instruction handler. The get call blocks until an // incoming client is available: ControlClientSource clientSource = ... InstructionRequestHandler instructionHandler = clientSource.get("worker-id");All
ControlClientPoolimplementations must be thread-safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceControlClientPool.SinkA sink forInstructionRequestHandlerskeyed by worker id.static interfaceControlClientPool.SourceA source ofInstructionRequestHandlers.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ControlClientPool.SinkgetSink()Sink for control clients.ControlClientPool.SourcegetSource()Source of control clients.
-
-
-
Method Detail
-
getSink
ControlClientPool.Sink getSink()
Sink for control clients.
-
getSource
ControlClientPool.Source getSource()
Source of control clients.
-
-