// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.0 // - protoc v3.21.12 // source: grpc/flow/flow.proto package flow import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( FlowService_StreamFlows_FullMethodName = "/netmaker.flow.FlowService/StreamFlows" ) // FlowServiceClient is the client API for FlowService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // * // Bidirectional streaming: // - Agents continuously send FlowEnvelope batches. // - Server replies with FlowResponse ACKs. type FlowServiceClient interface { StreamFlows(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[FlowEnvelope, FlowResponse], error) } type flowServiceClient struct { cc grpc.ClientConnInterface } func NewFlowServiceClient(cc grpc.ClientConnInterface) FlowServiceClient { return &flowServiceClient{cc} } func (c *flowServiceClient) StreamFlows(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[FlowEnvelope, FlowResponse], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &FlowService_ServiceDesc.Streams[0], FlowService_StreamFlows_FullMethodName, cOpts...) if err != nil { return nil, err } x := &grpc.GenericClientStream[FlowEnvelope, FlowResponse]{ClientStream: stream} return x, nil } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type FlowService_StreamFlowsClient = grpc.BidiStreamingClient[FlowEnvelope, FlowResponse] // FlowServiceServer is the server API for FlowService service. // All implementations must embed UnimplementedFlowServiceServer // for forward compatibility. // // * // Bidirectional streaming: // - Agents continuously send FlowEnvelope batches. // - Server replies with FlowResponse ACKs. type FlowServiceServer interface { StreamFlows(grpc.BidiStreamingServer[FlowEnvelope, FlowResponse]) error mustEmbedUnimplementedFlowServiceServer() } // UnimplementedFlowServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedFlowServiceServer struct{} func (UnimplementedFlowServiceServer) StreamFlows(grpc.BidiStreamingServer[FlowEnvelope, FlowResponse]) error { return status.Error(codes.Unimplemented, "method StreamFlows not implemented") } func (UnimplementedFlowServiceServer) mustEmbedUnimplementedFlowServiceServer() {} func (UnimplementedFlowServiceServer) testEmbeddedByValue() {} // UnsafeFlowServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FlowServiceServer will // result in compilation errors. type UnsafeFlowServiceServer interface { mustEmbedUnimplementedFlowServiceServer() } func RegisterFlowServiceServer(s grpc.ServiceRegistrar, srv FlowServiceServer) { // If the following call panics, it indicates UnimplementedFlowServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&FlowService_ServiceDesc, srv) } func _FlowService_StreamFlows_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(FlowServiceServer).StreamFlows(&grpc.GenericServerStream[FlowEnvelope, FlowResponse]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type FlowService_StreamFlowsServer = grpc.BidiStreamingServer[FlowEnvelope, FlowResponse] // FlowService_ServiceDesc is the grpc.ServiceDesc for FlowService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var FlowService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "netmaker.flow.FlowService", HandlerType: (*FlowServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamFlows", Handler: _FlowService_StreamFlows_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "grpc/flow/flow.proto", }