1pub mod admin;
9pub mod backend_endpoint_allocator;
10pub mod backend_launcher;
11pub mod backend_registry;
12pub mod broadcast;
13pub mod connection;
14pub mod control_socket;
15pub mod fd_pressure;
16pub mod handoff;
17pub mod handoff_serve;
18pub mod hello_handler;
19pub mod hello_router;
20pub mod idle_coord;
21pub mod instance;
22pub mod metrics;
23pub mod perf_guard;
24pub mod recovery;
25pub mod serve;
26pub mod service_def_loader;
27pub mod spawn_coordinator;
28pub mod spawn_wait;
29pub mod trace_context;
30pub mod version_allow_list;
31
32pub use admin::{
33 handle_admin_connection, serve_one_admin_socket, AdminBackend, AdminConnectionError,
34 AdminFrameError, AdminInodePressure, AdminSnapshot, AdminSpawnBudget, ADMIN_PAYLOAD_PROTOCOL,
35 ADMIN_SCHEMA_VERSION,
36};
37pub use backend_endpoint_allocator::{
38 BackendEndpointAllocator, BackendEndpointAllocatorError, DEFAULT_BACKEND_ENDPOINT_ATTEMPTS,
39};
40pub use backend_launcher::{
41 BackendLaunchError, BackendLaunchRequest, BackendLauncher, CommandBackendLauncher,
42 BACKEND_ENV_ENDPOINT_NAMESPACE, BACKEND_ENV_ENDPOINT_PATH, BACKEND_ENV_INSTANCE,
43 BACKEND_ENV_SERVICE_NAME, BACKEND_ENV_SERVICE_VERSION, BACKEND_ENV_TRACEPARENT,
44 BACKEND_ENV_TRACESTATE,
45};
46pub use backend_registry::{BackendKey, BackendRegistry};
47pub use broadcast::{
48 BroadcastAck, BroadcastBackend, BroadcastBackendResponse, BroadcastFailure,
49 BroadcastFailureReason, BroadcastOperation, BroadcastPolicy, BroadcastResult, BroadcastTimeout,
50 LifecycleBroadcastModel, QuiesceReason, DEFAULT_BROADCAST_ACK_TIMEOUT,
51};
52pub use connection::{
53 handle_hello_connection, handle_hello_connection_with,
54 handle_hello_connection_with_peer_policy, local_socket_name, serve_local_socket_connections,
55 serve_local_socket_connections_with, serve_local_socket_connections_with_peer_policy,
56 serve_local_socket_connections_with_policy, serve_one_local_socket,
57 serve_one_local_socket_with, serve_one_local_socket_with_peer_policy, BrokerConnectionError,
58 HelloResponder, PeerCredentialPolicy,
59};
60pub use control_socket::{
61 handle_control_connection_with_peer_policy,
62 handle_control_connection_with_peer_policy_and_fd_guard,
63 serve_control_socket_connections_with_limit_and_policy,
64 serve_control_socket_connections_with_limit_policy_and_post_hello,
65 serve_control_socket_connections_with_limit_policy_post_hello_and_fd_guard,
66 serve_control_socket_connections_with_policy, ControlSocketConnectionLimit, ControlSocketError,
67 ControlSocketReply,
68};
69pub use fd_pressure::{
70 fd_exhaustion_error_for_tests, is_fd_exhaustion_error, FdPressureConfig, FdPressureDecision,
71 FdPressureGuard, DEFAULT_FD_PRESSURE_RECOVERY_ACCEPTS, DEFAULT_FD_PRESSURE_RETRY_AFTER_MS,
72};
73pub use handoff::{
74 AcknowledgedHandoff, ExpiredHandoff, HandoffAckError, HandoffAckRegistry,
75 HandoffAttemptDecision, HandoffAttemptFailure, HandoffAttemptInputs, HandoffFallbackDecision,
76 HandoffFallbackPolicy, HandoffFallbackReason, HandoffFallbackState, HandoffToken,
77 HandoffTokenError, HandoffTokenStore, HandoffTokenStoreConfig, PendingHandoffBackend,
78 PendingHandoffOverflow, PendingHandoffQueue, PendingHandoffQueueConfig,
79 DEFAULT_HANDOFF_ACK_DEADLINE, DEFAULT_HANDOFF_FAILED_ATTEMPTS_PER_WINDOW,
80 DEFAULT_HANDOFF_FAILED_ATTEMPT_WINDOW, DEFAULT_HANDOFF_TOKEN_COLLISION_ATTEMPTS,
81 DEFAULT_HANDOFF_TOKEN_TTL, DEFAULT_MAX_PENDING_HANDOFFS, DEFAULT_MAX_PENDING_HANDOFF_TOKENS,
82 DEFAULT_PENDING_HANDOFF_TTL, HANDOFF_TOKEN_BYTES,
83};
84pub use handoff_serve::{complete_negotiated_handoff, ServeHandoffContext};
85pub use hello_handler::{
86 HelloHandler, HelloHandlerError, HelloRequest, PeerIdentity, RegisteredBackend,
87};
88pub use hello_router::HelloRouter;
89pub use idle_coord::{
90 BackendIdleCoordinator, BackendIdleDue, BackendIdlePolicy, DEFAULT_BACKEND_IDLE_TIMEOUT,
91};
92pub use instance::{BrokerInstanceError, BrokerInstanceKey};
93pub use perf_guard::{
94 enforce_hello_latency_budget, summarize_hello_latencies, HelloLatencySummary, PerfGuardError,
95 HELLO_P50_BUDGET, HELLO_P99_BUDGET, HELLO_PERF_GUARD_ENV, HELLO_PERF_SAMPLE_COUNT,
96};
97pub use recovery::{
98 BackendRecoveryDecision, BackendRecoveryPolicy, BackendRecoveryRefusalReason,
99 BackendRecoveryState, DEFAULT_RECOVERY_BUDGET_WINDOW, DEFAULT_RECOVERY_RETRY_BACKOFF,
100};
101pub use serve::{
102 build_hello_handler, serve_launching_backends, serve_launching_backends_with_launcher,
103 serve_registered_backend, BrokerLaunchServeConfig, BrokerServeConfig, BrokerServeError,
104};
105pub use service_def_loader::{
106 ensure_service_definition_dir, service_definition_dir, service_definition_path,
107 validate_service_definition_for_service, write_service_definition, ServiceDefinitionError,
108 ServiceDefinitionLoader, SERVICE_DEF_DIR_ENV, SERVICE_DEF_EXTENSION,
109};
110pub use spawn_coordinator::{
111 acquire_spawn_lock, SpawnBeginError, SpawnBudgetConfig, SpawnBudgetSnapshot, SpawnCoordinator,
112 SpawnLockError, SpawnLockFileIdentity, SpawnLockGuard, SpawnOutcome, SpawnPermit,
113 DEFAULT_SPAWN_ATTEMPTS_PER_WINDOW, DEFAULT_SPAWN_BUDGET_WINDOW,
114};
115pub use spawn_wait::{
116 SpawnWaitDecision, SpawnWaitPolicy, SpawnWaitProbe, DEFAULT_SPAWN_WAIT_HARD_CEILING,
117 SPAWN_WAIT_BACKOFF_SEQUENCE,
118};
119pub use trace_context::TraceContext;
120pub use version_allow_list::{check_version_allowed, VersionPolicyBlock};