// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.0 // - protoc v6.33.1 // source: shreder.proto package shreder_protos 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 ( ShrederService_SubscribeEntries_FullMethodName = "/shredstream.ShrederService/SubscribeEntries" ShrederService_SubscribeTransactions_FullMethodName = "/shredstream.ShrederService/SubscribeTransactions" ) // ShrederServiceClient is the client API for ShrederService 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. type ShrederServiceClient interface { SubscribeEntries(ctx context.Context, in *SubscribeEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Entry], error) SubscribeTransactions(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SubscribeTransactionsRequest, SubscribeTransactionsResponse], error) } type shrederServiceClient struct { cc grpc.ClientConnInterface } func NewShrederServiceClient(cc grpc.ClientConnInterface) ShrederServiceClient { return &shrederServiceClient{cc} } func (c *shrederServiceClient) SubscribeEntries(ctx context.Context, in *SubscribeEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Entry], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &ShrederService_ServiceDesc.Streams[0], ShrederService_SubscribeEntries_FullMethodName, cOpts...) if err != nil { return nil, err } x := &grpc.GenericClientStream[SubscribeEntriesRequest, Entry]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } 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 ShrederService_SubscribeEntriesClient = grpc.ServerStreamingClient[Entry] func (c *shrederServiceClient) SubscribeTransactions(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SubscribeTransactionsRequest, SubscribeTransactionsResponse], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &ShrederService_ServiceDesc.Streams[1], ShrederService_SubscribeTransactions_FullMethodName, cOpts...) if err != nil { return nil, err } x := &grpc.GenericClientStream[SubscribeTransactionsRequest, SubscribeTransactionsResponse]{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 ShrederService_SubscribeTransactionsClient = grpc.BidiStreamingClient[SubscribeTransactionsRequest, SubscribeTransactionsResponse] // ShrederServiceServer is the server API for ShrederService service. // All implementations must embed UnimplementedShrederServiceServer // for forward compatibility. type ShrederServiceServer interface { SubscribeEntries(*SubscribeEntriesRequest, grpc.ServerStreamingServer[Entry]) error SubscribeTransactions(grpc.BidiStreamingServer[SubscribeTransactionsRequest, SubscribeTransactionsResponse]) error mustEmbedUnimplementedShrederServiceServer() } // UnimplementedShrederServiceServer 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 UnimplementedShrederServiceServer struct{} func (UnimplementedShrederServiceServer) SubscribeEntries(*SubscribeEntriesRequest, grpc.ServerStreamingServer[Entry]) error { return status.Error(codes.Unimplemented, "method SubscribeEntries not implemented") } func (UnimplementedShrederServiceServer) SubscribeTransactions(grpc.BidiStreamingServer[SubscribeTransactionsRequest, SubscribeTransactionsResponse]) error { return status.Error(codes.Unimplemented, "method SubscribeTransactions not implemented") } func (UnimplementedShrederServiceServer) mustEmbedUnimplementedShrederServiceServer() {} func (UnimplementedShrederServiceServer) testEmbeddedByValue() {} // UnsafeShrederServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ShrederServiceServer will // result in compilation errors. type UnsafeShrederServiceServer interface { mustEmbedUnimplementedShrederServiceServer() } func RegisterShrederServiceServer(s grpc.ServiceRegistrar, srv ShrederServiceServer) { // If the following call panics, it indicates UnimplementedShrederServiceServer 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(&ShrederService_ServiceDesc, srv) } func _ShrederService_SubscribeEntries_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(SubscribeEntriesRequest) if err := stream.RecvMsg(m); err != nil { return err } return srv.(ShrederServiceServer).SubscribeEntries(m, &grpc.GenericServerStream[SubscribeEntriesRequest, Entry]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type ShrederService_SubscribeEntriesServer = grpc.ServerStreamingServer[Entry] func _ShrederService_SubscribeTransactions_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(ShrederServiceServer).SubscribeTransactions(&grpc.GenericServerStream[SubscribeTransactionsRequest, SubscribeTransactionsResponse]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type ShrederService_SubscribeTransactionsServer = grpc.BidiStreamingServer[SubscribeTransactionsRequest, SubscribeTransactionsResponse] // ShrederService_ServiceDesc is the grpc.ServiceDesc for ShrederService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ShrederService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "shredstream.ShrederService", HandlerType: (*ShrederServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "SubscribeEntries", Handler: _ShrederService_SubscribeEntries_Handler, ServerStreams: true, }, { StreamName: "SubscribeTransactions", Handler: _ShrederService_SubscribeTransactions_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "shreder.proto", }