// This is a generated file - do not edit. // // Generated from chain/v1/federation.proto. // @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references // ignore_for_file: constant_identifier_names // ignore_for_file: curly_braces_in_flow_control_structures // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes // ignore_for_file: non_constant_identifier_names, prefer_relative_imports import 'dart:async' as $async; import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; import 'federation.pb.dart' as $0; export 'federation.pb.dart'; /// Hub-to-hub federation. A satellite hub opens one persistent /// HTTP/2 connection to a primary hub. Within that connection, /// the four streams below multiplex. /// /// Phase 1.0 ships Control + Invoke + Blob + Events. A fifth /// stream (`Stream` for bidirectional streaming caps, e.g. live /// audio) is reserved for Phase 1.1; the slot stays free in the /// service so adding it is purely additive. /// /// See `docs/architecture/federation.md` for the full design, /// security model, and threat-model summary. @$pb.GrpcServiceName('chain.v1.Federation') class FederationClient extends $grpc.Client { /// The hostname for this service. static const $core.String defaultHost = ''; /// OAuth scopes needed for the client. static const $core.List<$core.String> oauthScopes = [ '', ]; FederationClient(super.channel, {super.options, super.interceptors}); /// Long-lived bidirectional Control stream. First two messages /// exchanged are always Hello (satellite -> primary) and Accept /// (primary -> satellite). Subsequent messages multiplex over /// the same channel: advertisements, withdrawals, heartbeats, /// renames, and cert renewals. /// /// Disconnect signals shutdown: the primary withdraws every /// capability advertised by this satellite. The satellite is /// expected to reconnect with exponential backoff. $grpc.ResponseStream<$0.ControlMessage> control( $async.Stream<$0.ControlMessage> request, { $grpc.CallOptions? options, }) { return $createStreamingCall(_$control, request, options: options); } /// Reserved stub. Cross-hub dispatch does NOT use a unary RPC: /// the satellite dials outbound (NAT-friendly) and is the gRPC /// client, so the primary cannot open a call back into it. Real /// dispatch flows over the Control stream via DispatchCall / /// DispatchResult (FED-06). This RPC stays declared only so the /// service slot is stable; it returns UNIMPLEMENTED. /// /// The satellite resolves `capability_id` against its **local** /// registry; unknown capabilities return CAPABILITY_NOT_SUPPORTED. /// The wire never carries executable content — only inputs. $grpc.ResponseFuture<$0.DispatchResponse> dispatch( $0.DispatchRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$dispatch, request, options: options); } /// Bidirectional chunked binary transfer. Used for `bytes` /// payloads above `federation.blob_threshold` (default 1 MiB). /// The first message on either side is BlobOpen describing the /// operation ("upload" or "download"); subsequent messages /// carry data or end-of-stream / error markers. $grpc.ResponseStream<$0.BlobChunk> blob( $async.Stream<$0.BlobChunk> request, { $grpc.CallOptions? options, }) { return $createStreamingCall(_$blob, request, options: options); } /// Server-streaming relay of audit + step events from a /// satellite to the primary. The primary's Studio uses this to /// show live progress of remote flow runs and to surface /// approval-pending notices from remote steps. $grpc.ResponseStream<$0.RelayedEvent> events( $0.EventsRequest request, { $grpc.CallOptions? options, }) { return $createStreamingCall(_$events, $async.Stream.fromIterable([request]), options: options); } // method descriptors static final _$control = $grpc.ClientMethod<$0.ControlMessage, $0.ControlMessage>( '/chain.v1.Federation/Control', ($0.ControlMessage value) => value.writeToBuffer(), $0.ControlMessage.fromBuffer); static final _$dispatch = $grpc.ClientMethod<$0.DispatchRequest, $0.DispatchResponse>( '/chain.v1.Federation/Dispatch', ($0.DispatchRequest value) => value.writeToBuffer(), $0.DispatchResponse.fromBuffer); static final _$blob = $grpc.ClientMethod<$0.BlobChunk, $0.BlobChunk>( '/chain.v1.Federation/Blob', ($0.BlobChunk value) => value.writeToBuffer(), $0.BlobChunk.fromBuffer); static final _$events = $grpc.ClientMethod<$0.EventsRequest, $0.RelayedEvent>( '/chain.v1.Federation/Events', ($0.EventsRequest value) => value.writeToBuffer(), $0.RelayedEvent.fromBuffer); } @$pb.GrpcServiceName('chain.v1.Federation') abstract class FederationServiceBase extends $grpc.Service { $core.String get $name => 'chain.v1.Federation'; FederationServiceBase() { $addMethod($grpc.ServiceMethod<$0.ControlMessage, $0.ControlMessage>( 'Control', control, true, true, ($core.List<$core.int> value) => $0.ControlMessage.fromBuffer(value), ($0.ControlMessage value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.DispatchRequest, $0.DispatchResponse>( 'Dispatch', dispatch_Pre, false, false, ($core.List<$core.int> value) => $0.DispatchRequest.fromBuffer(value), ($0.DispatchResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.BlobChunk, $0.BlobChunk>( 'Blob', blob, true, true, ($core.List<$core.int> value) => $0.BlobChunk.fromBuffer(value), ($0.BlobChunk value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.EventsRequest, $0.RelayedEvent>( 'Events', events_Pre, false, true, ($core.List<$core.int> value) => $0.EventsRequest.fromBuffer(value), ($0.RelayedEvent value) => value.writeToBuffer())); } $async.Stream<$0.ControlMessage> control( $grpc.ServiceCall call, $async.Stream<$0.ControlMessage> request); $async.Future<$0.DispatchResponse> dispatch_Pre($grpc.ServiceCall $call, $async.Future<$0.DispatchRequest> $request) async { return dispatch($call, await $request); } $async.Future<$0.DispatchResponse> dispatch( $grpc.ServiceCall call, $0.DispatchRequest request); $async.Stream<$0.BlobChunk> blob( $grpc.ServiceCall call, $async.Stream<$0.BlobChunk> request); $async.Stream<$0.RelayedEvent> events_Pre($grpc.ServiceCall $call, $async.Future<$0.EventsRequest> $request) async* { yield* events($call, await $request); } $async.Stream<$0.RelayedEvent> events( $grpc.ServiceCall call, $0.EventsRequest request); }