@@ -250,7 +250,7 @@ const file_hellreign_proto_rawDesc = "" +
|
||||
"\tCollector\x12;\n" +
|
||||
"\x06Stream\x12\x16.chat.CollectorRequest\x1a\x17.chat.CollectorResponse(\x012?\n" +
|
||||
"\tCommander\x122\n" +
|
||||
"\x06Stream\x12\r.chat.Command\x1a\x15.chat.FinishedCommand(\x010\x01B0Z.gitea.d3m0k1d.ru/d3m0k1d/HellreigN/proto/protob\x06proto3"
|
||||
"\x06Stream\x12\x15.chat.FinishedCommand\x1a\r.chat.Command(\x010\x01B0Z.gitea.d3m0k1d.ru/d3m0k1d/HellreigN/proto/protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_hellreign_proto_rawDescOnce sync.Once
|
||||
@@ -273,9 +273,9 @@ var file_hellreign_proto_goTypes = []any{
|
||||
}
|
||||
var file_hellreign_proto_depIdxs = []int32{
|
||||
0, // 0: chat.Collector.Stream:input_type -> chat.CollectorRequest
|
||||
2, // 1: chat.Commander.Stream:input_type -> chat.Command
|
||||
3, // 1: chat.Commander.Stream:input_type -> chat.FinishedCommand
|
||||
1, // 2: chat.Collector.Stream:output_type -> chat.CollectorResponse
|
||||
3, // 3: chat.Commander.Stream:output_type -> chat.FinishedCommand
|
||||
2, // 3: chat.Commander.Stream:output_type -> chat.Command
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
|
||||
@@ -121,7 +121,7 @@ const (
|
||||
//
|
||||
// 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 CommanderClient interface {
|
||||
Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Command, FinishedCommand], error)
|
||||
Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[FinishedCommand, Command], error)
|
||||
}
|
||||
|
||||
type commanderClient struct {
|
||||
@@ -132,24 +132,24 @@ func NewCommanderClient(cc grpc.ClientConnInterface) CommanderClient {
|
||||
return &commanderClient{cc}
|
||||
}
|
||||
|
||||
func (c *commanderClient) Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Command, FinishedCommand], error) {
|
||||
func (c *commanderClient) Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[FinishedCommand, Command], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Commander_ServiceDesc.Streams[0], Commander_Stream_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[Command, FinishedCommand]{ClientStream: stream}
|
||||
x := &grpc.GenericClientStream[FinishedCommand, Command]{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 Commander_StreamClient = grpc.BidiStreamingClient[Command, FinishedCommand]
|
||||
type Commander_StreamClient = grpc.BidiStreamingClient[FinishedCommand, Command]
|
||||
|
||||
// CommanderServer is the server API for Commander service.
|
||||
// All implementations must embed UnimplementedCommanderServer
|
||||
// for forward compatibility.
|
||||
type CommanderServer interface {
|
||||
Stream(grpc.BidiStreamingServer[Command, FinishedCommand]) error
|
||||
Stream(grpc.BidiStreamingServer[FinishedCommand, Command]) error
|
||||
mustEmbedUnimplementedCommanderServer()
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ type CommanderServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedCommanderServer struct{}
|
||||
|
||||
func (UnimplementedCommanderServer) Stream(grpc.BidiStreamingServer[Command, FinishedCommand]) error {
|
||||
func (UnimplementedCommanderServer) Stream(grpc.BidiStreamingServer[FinishedCommand, Command]) error {
|
||||
return status.Error(codes.Unimplemented, "method Stream not implemented")
|
||||
}
|
||||
func (UnimplementedCommanderServer) mustEmbedUnimplementedCommanderServer() {}
|
||||
@@ -185,11 +185,11 @@ func RegisterCommanderServer(s grpc.ServiceRegistrar, srv CommanderServer) {
|
||||
}
|
||||
|
||||
func _Commander_Stream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(CommanderServer).Stream(&grpc.GenericServerStream[Command, FinishedCommand]{ServerStream: stream})
|
||||
return srv.(CommanderServer).Stream(&grpc.GenericServerStream[FinishedCommand, Command]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Commander_StreamServer = grpc.BidiStreamingServer[Command, FinishedCommand]
|
||||
type Commander_StreamServer = grpc.BidiStreamingServer[FinishedCommand, Command]
|
||||
|
||||
// Commander_ServiceDesc is the grpc.ServiceDesc for Commander service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
|
||||
Reference in New Issue
Block a user