2025-12-26 10:57:37 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2025-12-30 11:03:11 +08:00
// - protoc-gen-go-grpc v1.3.0
2025-12-26 10:57:37 +08:00
// - protoc v6.33.1
// source: shreder.proto
2025-12-30 11:03:11 +08:00
package shreder
2025-12-26 10:57:37 +08:00
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.
2025-12-30 11:03:11 +08:00
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
2025-12-26 10:57:37 +08:00
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 {
2025-12-30 11:03:11 +08:00
SubscribeEntries ( ctx context . Context , in * SubscribeEntriesRequest , opts ... grpc . CallOption ) ( ShrederService_SubscribeEntriesClient , error )
SubscribeTransactions ( ctx context . Context , opts ... grpc . CallOption ) ( ShrederService_SubscribeTransactionsClient , error )
2025-12-26 10:57:37 +08:00
}
type shrederServiceClient struct {
cc grpc . ClientConnInterface
}
func NewShrederServiceClient ( cc grpc . ClientConnInterface ) ShrederServiceClient {
return & shrederServiceClient { cc }
}
2025-12-30 11:03:11 +08:00
func ( c * shrederServiceClient ) SubscribeEntries ( ctx context . Context , in * SubscribeEntriesRequest , opts ... grpc . CallOption ) ( ShrederService_SubscribeEntriesClient , error ) {
stream , err := c . cc . NewStream ( ctx , & ShrederService_ServiceDesc . Streams [ 0 ] , ShrederService_SubscribeEntries_FullMethodName , opts ... )
2025-12-26 10:57:37 +08:00
if err != nil {
return nil , err
}
2025-12-30 11:03:11 +08:00
x := & shrederServiceSubscribeEntriesClient { stream }
2025-12-26 10:57:37 +08:00
if err := x . ClientStream . SendMsg ( in ) ; err != nil {
return nil , err
}
if err := x . ClientStream . CloseSend ( ) ; err != nil {
return nil , err
}
return x , nil
}
2025-12-30 11:03:11 +08:00
type ShrederService_SubscribeEntriesClient interface {
Recv ( ) ( * Entry , error )
grpc . ClientStream
}
type shrederServiceSubscribeEntriesClient struct {
grpc . ClientStream
}
2025-12-26 10:57:37 +08:00
2025-12-30 11:03:11 +08:00
func ( x * shrederServiceSubscribeEntriesClient ) Recv ( ) ( * Entry , error ) {
m := new ( Entry )
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
func ( c * shrederServiceClient ) SubscribeTransactions ( ctx context . Context , opts ... grpc . CallOption ) ( ShrederService_SubscribeTransactionsClient , error ) {
stream , err := c . cc . NewStream ( ctx , & ShrederService_ServiceDesc . Streams [ 1 ] , ShrederService_SubscribeTransactions_FullMethodName , opts ... )
2025-12-26 10:57:37 +08:00
if err != nil {
return nil , err
}
2025-12-30 11:03:11 +08:00
x := & shrederServiceSubscribeTransactionsClient { stream }
2025-12-26 10:57:37 +08:00
return x , nil
}
2025-12-30 11:03:11 +08:00
type ShrederService_SubscribeTransactionsClient interface {
Send ( * SubscribeTransactionsRequest ) error
Recv ( ) ( * SubscribeTransactionsResponse , error )
grpc . ClientStream
}
type shrederServiceSubscribeTransactionsClient struct {
grpc . ClientStream
}
func ( x * shrederServiceSubscribeTransactionsClient ) Send ( m * SubscribeTransactionsRequest ) error {
return x . ClientStream . SendMsg ( m )
}
func ( x * shrederServiceSubscribeTransactionsClient ) Recv ( ) ( * SubscribeTransactionsResponse , error ) {
m := new ( SubscribeTransactionsResponse )
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2025-12-26 10:57:37 +08:00
// ShrederServiceServer is the server API for ShrederService service.
// All implementations must embed UnimplementedShrederServiceServer
2025-12-30 11:03:11 +08:00
// for forward compatibility
2025-12-26 10:57:37 +08:00
type ShrederServiceServer interface {
2025-12-30 11:03:11 +08:00
SubscribeEntries ( * SubscribeEntriesRequest , ShrederService_SubscribeEntriesServer ) error
SubscribeTransactions ( ShrederService_SubscribeTransactionsServer ) error
2025-12-26 10:57:37 +08:00
mustEmbedUnimplementedShrederServiceServer ( )
}
2025-12-30 11:03:11 +08:00
// UnimplementedShrederServiceServer must be embedded to have forward compatible implementations.
type UnimplementedShrederServiceServer struct {
}
2025-12-26 10:57:37 +08:00
2025-12-30 11:03:11 +08:00
func ( UnimplementedShrederServiceServer ) SubscribeEntries ( * SubscribeEntriesRequest , ShrederService_SubscribeEntriesServer ) error {
return status . Errorf ( codes . Unimplemented , "method SubscribeEntries not implemented" )
2025-12-26 10:57:37 +08:00
}
2025-12-30 11:03:11 +08:00
func ( UnimplementedShrederServiceServer ) SubscribeTransactions ( ShrederService_SubscribeTransactionsServer ) error {
return status . Errorf ( codes . Unimplemented , "method SubscribeTransactions not implemented" )
2025-12-26 10:57:37 +08:00
}
func ( UnimplementedShrederServiceServer ) mustEmbedUnimplementedShrederServiceServer ( ) { }
// 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 ) {
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
}
2025-12-30 11:03:11 +08:00
return srv . ( ShrederServiceServer ) . SubscribeEntries ( m , & shrederServiceSubscribeEntriesServer { stream } )
}
type ShrederService_SubscribeEntriesServer interface {
Send ( * Entry ) error
grpc . ServerStream
2025-12-26 10:57:37 +08:00
}
2025-12-30 11:03:11 +08:00
type shrederServiceSubscribeEntriesServer struct {
grpc . ServerStream
}
func ( x * shrederServiceSubscribeEntriesServer ) Send ( m * Entry ) error {
return x . ServerStream . SendMsg ( m )
}
2025-12-26 10:57:37 +08:00
func _ShrederService_SubscribeTransactions_Handler ( srv interface { } , stream grpc . ServerStream ) error {
2025-12-30 11:03:11 +08:00
return srv . ( ShrederServiceServer ) . SubscribeTransactions ( & shrederServiceSubscribeTransactionsServer { stream } )
}
type ShrederService_SubscribeTransactionsServer interface {
Send ( * SubscribeTransactionsResponse ) error
Recv ( ) ( * SubscribeTransactionsRequest , error )
grpc . ServerStream
}
type shrederServiceSubscribeTransactionsServer struct {
grpc . ServerStream
}
func ( x * shrederServiceSubscribeTransactionsServer ) Send ( m * SubscribeTransactionsResponse ) error {
return x . ServerStream . SendMsg ( m )
2025-12-26 10:57:37 +08:00
}
2025-12-30 11:03:11 +08:00
func ( x * shrederServiceSubscribeTransactionsServer ) Recv ( ) ( * SubscribeTransactionsRequest , error ) {
m := new ( SubscribeTransactionsRequest )
if err := x . ServerStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2025-12-26 10:57:37 +08:00
// 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" ,
}