|
|
@ -29,8 +29,8 @@ const ( |
|
|
|
SeaweedMessaging_ClosePublishers_FullMethodName = "/messaging_pb.SeaweedMessaging/ClosePublishers" |
|
|
|
SeaweedMessaging_CloseSubscribers_FullMethodName = "/messaging_pb.SeaweedMessaging/CloseSubscribers" |
|
|
|
SeaweedMessaging_SubscriberToSubCoordinator_FullMethodName = "/messaging_pb.SeaweedMessaging/SubscriberToSubCoordinator" |
|
|
|
SeaweedMessaging_Publish_FullMethodName = "/messaging_pb.SeaweedMessaging/Publish" |
|
|
|
SeaweedMessaging_Subscribe_FullMethodName = "/messaging_pb.SeaweedMessaging/Subscribe" |
|
|
|
SeaweedMessaging_PublishMessage_FullMethodName = "/messaging_pb.SeaweedMessaging/PublishMessage" |
|
|
|
SeaweedMessaging_SubscribeMessage_FullMethodName = "/messaging_pb.SeaweedMessaging/SubscribeMessage" |
|
|
|
) |
|
|
|
|
|
|
|
// SeaweedMessagingClient is the client API for SeaweedMessaging service.
|
|
|
@ -53,8 +53,8 @@ type SeaweedMessagingClient interface { |
|
|
|
// subscriber connects to broker balancer, which coordinates with the subscribers
|
|
|
|
SubscriberToSubCoordinator(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscriberToSubCoordinatorClient, error) |
|
|
|
// data plane for each topic partition
|
|
|
|
Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error) |
|
|
|
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error) |
|
|
|
PublishMessage(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishMessageClient, error) |
|
|
|
SubscribeMessage(ctx context.Context, in *SubscribeMessageRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeMessageClient, error) |
|
|
|
} |
|
|
|
|
|
|
|
type seaweedMessagingClient struct { |
|
|
@ -199,43 +199,43 @@ func (x *seaweedMessagingSubscriberToSubCoordinatorClient) Recv() (*SubscriberTo |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (c *seaweedMessagingClient) Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error) { |
|
|
|
stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[2], SeaweedMessaging_Publish_FullMethodName, opts...) |
|
|
|
func (c *seaweedMessagingClient) PublishMessage(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishMessageClient, error) { |
|
|
|
stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[2], SeaweedMessaging_PublishMessage_FullMethodName, opts...) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
x := &seaweedMessagingPublishClient{stream} |
|
|
|
x := &seaweedMessagingPublishMessageClient{stream} |
|
|
|
return x, nil |
|
|
|
} |
|
|
|
|
|
|
|
type SeaweedMessaging_PublishClient interface { |
|
|
|
Send(*PublishRequest) error |
|
|
|
Recv() (*PublishResponse, error) |
|
|
|
type SeaweedMessaging_PublishMessageClient interface { |
|
|
|
Send(*PublishMessageRequest) error |
|
|
|
Recv() (*PublishMessageResponse, error) |
|
|
|
grpc.ClientStream |
|
|
|
} |
|
|
|
|
|
|
|
type seaweedMessagingPublishClient struct { |
|
|
|
type seaweedMessagingPublishMessageClient struct { |
|
|
|
grpc.ClientStream |
|
|
|
} |
|
|
|
|
|
|
|
func (x *seaweedMessagingPublishClient) Send(m *PublishRequest) error { |
|
|
|
func (x *seaweedMessagingPublishMessageClient) Send(m *PublishMessageRequest) error { |
|
|
|
return x.ClientStream.SendMsg(m) |
|
|
|
} |
|
|
|
|
|
|
|
func (x *seaweedMessagingPublishClient) Recv() (*PublishResponse, error) { |
|
|
|
m := new(PublishResponse) |
|
|
|
func (x *seaweedMessagingPublishMessageClient) Recv() (*PublishMessageResponse, error) { |
|
|
|
m := new(PublishMessageResponse) |
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (c *seaweedMessagingClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error) { |
|
|
|
stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[3], SeaweedMessaging_Subscribe_FullMethodName, opts...) |
|
|
|
func (c *seaweedMessagingClient) SubscribeMessage(ctx context.Context, in *SubscribeMessageRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeMessageClient, error) { |
|
|
|
stream, err := c.cc.NewStream(ctx, &SeaweedMessaging_ServiceDesc.Streams[3], SeaweedMessaging_SubscribeMessage_FullMethodName, opts...) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
x := &seaweedMessagingSubscribeClient{stream} |
|
|
|
x := &seaweedMessagingSubscribeMessageClient{stream} |
|
|
|
if err := x.ClientStream.SendMsg(in); err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
@ -245,17 +245,17 @@ func (c *seaweedMessagingClient) Subscribe(ctx context.Context, in *SubscribeReq |
|
|
|
return x, nil |
|
|
|
} |
|
|
|
|
|
|
|
type SeaweedMessaging_SubscribeClient interface { |
|
|
|
Recv() (*SubscribeResponse, error) |
|
|
|
type SeaweedMessaging_SubscribeMessageClient interface { |
|
|
|
Recv() (*SubscribeMessageResponse, error) |
|
|
|
grpc.ClientStream |
|
|
|
} |
|
|
|
|
|
|
|
type seaweedMessagingSubscribeClient struct { |
|
|
|
type seaweedMessagingSubscribeMessageClient struct { |
|
|
|
grpc.ClientStream |
|
|
|
} |
|
|
|
|
|
|
|
func (x *seaweedMessagingSubscribeClient) Recv() (*SubscribeResponse, error) { |
|
|
|
m := new(SubscribeResponse) |
|
|
|
func (x *seaweedMessagingSubscribeMessageClient) Recv() (*SubscribeMessageResponse, error) { |
|
|
|
m := new(SubscribeMessageResponse) |
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
@ -282,8 +282,8 @@ type SeaweedMessagingServer interface { |
|
|
|
// subscriber connects to broker balancer, which coordinates with the subscribers
|
|
|
|
SubscriberToSubCoordinator(SeaweedMessaging_SubscriberToSubCoordinatorServer) error |
|
|
|
// data plane for each topic partition
|
|
|
|
Publish(SeaweedMessaging_PublishServer) error |
|
|
|
Subscribe(*SubscribeRequest, SeaweedMessaging_SubscribeServer) error |
|
|
|
PublishMessage(SeaweedMessaging_PublishMessageServer) error |
|
|
|
SubscribeMessage(*SubscribeMessageRequest, SeaweedMessaging_SubscribeMessageServer) error |
|
|
|
mustEmbedUnimplementedSeaweedMessagingServer() |
|
|
|
} |
|
|
|
|
|
|
@ -321,11 +321,11 @@ func (UnimplementedSeaweedMessagingServer) CloseSubscribers(context.Context, *Cl |
|
|
|
func (UnimplementedSeaweedMessagingServer) SubscriberToSubCoordinator(SeaweedMessaging_SubscriberToSubCoordinatorServer) error { |
|
|
|
return status.Errorf(codes.Unimplemented, "method SubscriberToSubCoordinator not implemented") |
|
|
|
} |
|
|
|
func (UnimplementedSeaweedMessagingServer) Publish(SeaweedMessaging_PublishServer) error { |
|
|
|
return status.Errorf(codes.Unimplemented, "method Publish not implemented") |
|
|
|
func (UnimplementedSeaweedMessagingServer) PublishMessage(SeaweedMessaging_PublishMessageServer) error { |
|
|
|
return status.Errorf(codes.Unimplemented, "method PublishMessage not implemented") |
|
|
|
} |
|
|
|
func (UnimplementedSeaweedMessagingServer) Subscribe(*SubscribeRequest, SeaweedMessaging_SubscribeServer) error { |
|
|
|
return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") |
|
|
|
func (UnimplementedSeaweedMessagingServer) SubscribeMessage(*SubscribeMessageRequest, SeaweedMessaging_SubscribeMessageServer) error { |
|
|
|
return status.Errorf(codes.Unimplemented, "method SubscribeMessage not implemented") |
|
|
|
} |
|
|
|
func (UnimplementedSeaweedMessagingServer) mustEmbedUnimplementedSeaweedMessagingServer() {} |
|
|
|
|
|
|
@ -536,50 +536,50 @@ func (x *seaweedMessagingSubscriberToSubCoordinatorServer) Recv() (*SubscriberTo |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func _SeaweedMessaging_Publish_Handler(srv interface{}, stream grpc.ServerStream) error { |
|
|
|
return srv.(SeaweedMessagingServer).Publish(&seaweedMessagingPublishServer{stream}) |
|
|
|
func _SeaweedMessaging_PublishMessage_Handler(srv interface{}, stream grpc.ServerStream) error { |
|
|
|
return srv.(SeaweedMessagingServer).PublishMessage(&seaweedMessagingPublishMessageServer{stream}) |
|
|
|
} |
|
|
|
|
|
|
|
type SeaweedMessaging_PublishServer interface { |
|
|
|
Send(*PublishResponse) error |
|
|
|
Recv() (*PublishRequest, error) |
|
|
|
type SeaweedMessaging_PublishMessageServer interface { |
|
|
|
Send(*PublishMessageResponse) error |
|
|
|
Recv() (*PublishMessageRequest, error) |
|
|
|
grpc.ServerStream |
|
|
|
} |
|
|
|
|
|
|
|
type seaweedMessagingPublishServer struct { |
|
|
|
type seaweedMessagingPublishMessageServer struct { |
|
|
|
grpc.ServerStream |
|
|
|
} |
|
|
|
|
|
|
|
func (x *seaweedMessagingPublishServer) Send(m *PublishResponse) error { |
|
|
|
func (x *seaweedMessagingPublishMessageServer) Send(m *PublishMessageResponse) error { |
|
|
|
return x.ServerStream.SendMsg(m) |
|
|
|
} |
|
|
|
|
|
|
|
func (x *seaweedMessagingPublishServer) Recv() (*PublishRequest, error) { |
|
|
|
m := new(PublishRequest) |
|
|
|
func (x *seaweedMessagingPublishMessageServer) Recv() (*PublishMessageRequest, error) { |
|
|
|
m := new(PublishMessageRequest) |
|
|
|
if err := x.ServerStream.RecvMsg(m); err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func _SeaweedMessaging_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { |
|
|
|
m := new(SubscribeRequest) |
|
|
|
func _SeaweedMessaging_SubscribeMessage_Handler(srv interface{}, stream grpc.ServerStream) error { |
|
|
|
m := new(SubscribeMessageRequest) |
|
|
|
if err := stream.RecvMsg(m); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
return srv.(SeaweedMessagingServer).Subscribe(m, &seaweedMessagingSubscribeServer{stream}) |
|
|
|
return srv.(SeaweedMessagingServer).SubscribeMessage(m, &seaweedMessagingSubscribeMessageServer{stream}) |
|
|
|
} |
|
|
|
|
|
|
|
type SeaweedMessaging_SubscribeServer interface { |
|
|
|
Send(*SubscribeResponse) error |
|
|
|
type SeaweedMessaging_SubscribeMessageServer interface { |
|
|
|
Send(*SubscribeMessageResponse) error |
|
|
|
grpc.ServerStream |
|
|
|
} |
|
|
|
|
|
|
|
type seaweedMessagingSubscribeServer struct { |
|
|
|
type seaweedMessagingSubscribeMessageServer struct { |
|
|
|
grpc.ServerStream |
|
|
|
} |
|
|
|
|
|
|
|
func (x *seaweedMessagingSubscribeServer) Send(m *SubscribeResponse) error { |
|
|
|
func (x *seaweedMessagingSubscribeMessageServer) Send(m *SubscribeMessageResponse) error { |
|
|
|
return x.ServerStream.SendMsg(m) |
|
|
|
} |
|
|
|
|
|
|
@ -637,14 +637,14 @@ var SeaweedMessaging_ServiceDesc = grpc.ServiceDesc{ |
|
|
|
ClientStreams: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
StreamName: "Publish", |
|
|
|
Handler: _SeaweedMessaging_Publish_Handler, |
|
|
|
StreamName: "PublishMessage", |
|
|
|
Handler: _SeaweedMessaging_PublishMessage_Handler, |
|
|
|
ServerStreams: true, |
|
|
|
ClientStreams: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
StreamName: "Subscribe", |
|
|
|
Handler: _SeaweedMessaging_Subscribe_Handler, |
|
|
|
StreamName: "SubscribeMessage", |
|
|
|
Handler: _SeaweedMessaging_SubscribeMessage_Handler, |
|
|
|
ServerStreams: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|