|
@ -33,6 +33,7 @@ type SeaweedMessagingClient interface { |
|
|
LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error) |
|
|
LookupTopicBrokers(ctx context.Context, in *LookupTopicBrokersRequest, opts ...grpc.CallOption) (*LookupTopicBrokersResponse, error) |
|
|
CreateTopic(ctx context.Context, in *CreateTopicRequest, opts ...grpc.CallOption) (*CreateTopicResponse, error) |
|
|
CreateTopic(ctx context.Context, in *CreateTopicRequest, opts ...grpc.CallOption) (*CreateTopicResponse, error) |
|
|
DoCreateTopic(ctx context.Context, in *DoCreateTopicRequest, opts ...grpc.CallOption) (*DoCreateTopicResponse, error) |
|
|
DoCreateTopic(ctx context.Context, in *DoCreateTopicRequest, opts ...grpc.CallOption) (*DoCreateTopicResponse, error) |
|
|
|
|
|
ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error) |
|
|
// a pub client will call this to get the topic partitions assignment
|
|
|
// a pub client will call this to get the topic partitions assignment
|
|
|
RequestTopicPartitions(ctx context.Context, in *RequestTopicPartitionsRequest, opts ...grpc.CallOption) (*RequestTopicPartitionsResponse, error) |
|
|
RequestTopicPartitions(ctx context.Context, in *RequestTopicPartitionsRequest, opts ...grpc.CallOption) (*RequestTopicPartitionsResponse, error) |
|
|
AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error) |
|
|
AssignTopicPartitions(ctx context.Context, in *AssignTopicPartitionsRequest, opts ...grpc.CallOption) (*AssignTopicPartitionsResponse, error) |
|
@ -144,6 +145,15 @@ func (c *seaweedMessagingClient) DoCreateTopic(ctx context.Context, in *DoCreate |
|
|
return out, nil |
|
|
return out, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (c *seaweedMessagingClient) ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error) { |
|
|
|
|
|
out := new(ListTopicsResponse) |
|
|
|
|
|
err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/ListTopics", in, out, opts...) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return nil, err |
|
|
|
|
|
} |
|
|
|
|
|
return out, nil |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func (c *seaweedMessagingClient) RequestTopicPartitions(ctx context.Context, in *RequestTopicPartitionsRequest, opts ...grpc.CallOption) (*RequestTopicPartitionsResponse, error) { |
|
|
func (c *seaweedMessagingClient) RequestTopicPartitions(ctx context.Context, in *RequestTopicPartitionsRequest, opts ...grpc.CallOption) (*RequestTopicPartitionsResponse, error) { |
|
|
out := new(RequestTopicPartitionsResponse) |
|
|
out := new(RequestTopicPartitionsResponse) |
|
|
err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/RequestTopicPartitions", in, out, opts...) |
|
|
err := c.cc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/RequestTopicPartitions", in, out, opts...) |
|
@ -249,6 +259,7 @@ type SeaweedMessagingServer interface { |
|
|
LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error) |
|
|
LookupTopicBrokers(context.Context, *LookupTopicBrokersRequest) (*LookupTopicBrokersResponse, error) |
|
|
CreateTopic(context.Context, *CreateTopicRequest) (*CreateTopicResponse, error) |
|
|
CreateTopic(context.Context, *CreateTopicRequest) (*CreateTopicResponse, error) |
|
|
DoCreateTopic(context.Context, *DoCreateTopicRequest) (*DoCreateTopicResponse, error) |
|
|
DoCreateTopic(context.Context, *DoCreateTopicRequest) (*DoCreateTopicResponse, error) |
|
|
|
|
|
ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error) |
|
|
// a pub client will call this to get the topic partitions assignment
|
|
|
// a pub client will call this to get the topic partitions assignment
|
|
|
RequestTopicPartitions(context.Context, *RequestTopicPartitionsRequest) (*RequestTopicPartitionsResponse, error) |
|
|
RequestTopicPartitions(context.Context, *RequestTopicPartitionsRequest) (*RequestTopicPartitionsResponse, error) |
|
|
AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error) |
|
|
AssignTopicPartitions(context.Context, *AssignTopicPartitionsRequest) (*AssignTopicPartitionsResponse, error) |
|
@ -287,6 +298,9 @@ func (UnimplementedSeaweedMessagingServer) CreateTopic(context.Context, *CreateT |
|
|
func (UnimplementedSeaweedMessagingServer) DoCreateTopic(context.Context, *DoCreateTopicRequest) (*DoCreateTopicResponse, error) { |
|
|
func (UnimplementedSeaweedMessagingServer) DoCreateTopic(context.Context, *DoCreateTopicRequest) (*DoCreateTopicResponse, error) { |
|
|
return nil, status.Errorf(codes.Unimplemented, "method DoCreateTopic not implemented") |
|
|
return nil, status.Errorf(codes.Unimplemented, "method DoCreateTopic not implemented") |
|
|
} |
|
|
} |
|
|
|
|
|
func (UnimplementedSeaweedMessagingServer) ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error) { |
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListTopics not implemented") |
|
|
|
|
|
} |
|
|
func (UnimplementedSeaweedMessagingServer) RequestTopicPartitions(context.Context, *RequestTopicPartitionsRequest) (*RequestTopicPartitionsResponse, error) { |
|
|
func (UnimplementedSeaweedMessagingServer) RequestTopicPartitions(context.Context, *RequestTopicPartitionsRequest) (*RequestTopicPartitionsResponse, error) { |
|
|
return nil, status.Errorf(codes.Unimplemented, "method RequestTopicPartitions not implemented") |
|
|
return nil, status.Errorf(codes.Unimplemented, "method RequestTopicPartitions not implemented") |
|
|
} |
|
|
} |
|
@ -467,6 +481,24 @@ func _SeaweedMessaging_DoCreateTopic_Handler(srv interface{}, ctx context.Contex |
|
|
return interceptor(ctx, in, info, handler) |
|
|
return interceptor(ctx, in, info, handler) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func _SeaweedMessaging_ListTopics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
|
|
|
|
in := new(ListTopicsRequest) |
|
|
|
|
|
if err := dec(in); err != nil { |
|
|
|
|
|
return nil, err |
|
|
|
|
|
} |
|
|
|
|
|
if interceptor == nil { |
|
|
|
|
|
return srv.(SeaweedMessagingServer).ListTopics(ctx, in) |
|
|
|
|
|
} |
|
|
|
|
|
info := &grpc.UnaryServerInfo{ |
|
|
|
|
|
Server: srv, |
|
|
|
|
|
FullMethod: "/messaging_pb.SeaweedMessaging/ListTopics", |
|
|
|
|
|
} |
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
|
|
|
|
return srv.(SeaweedMessagingServer).ListTopics(ctx, req.(*ListTopicsRequest)) |
|
|
|
|
|
} |
|
|
|
|
|
return interceptor(ctx, in, info, handler) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func _SeaweedMessaging_RequestTopicPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
|
func _SeaweedMessaging_RequestTopicPartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
|
in := new(RequestTopicPartitionsRequest) |
|
|
in := new(RequestTopicPartitionsRequest) |
|
|
if err := dec(in); err != nil { |
|
|
if err := dec(in); err != nil { |
|
@ -603,6 +635,10 @@ var SeaweedMessaging_ServiceDesc = grpc.ServiceDesc{ |
|
|
MethodName: "DoCreateTopic", |
|
|
MethodName: "DoCreateTopic", |
|
|
Handler: _SeaweedMessaging_DoCreateTopic_Handler, |
|
|
Handler: _SeaweedMessaging_DoCreateTopic_Handler, |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
MethodName: "ListTopics", |
|
|
|
|
|
Handler: _SeaweedMessaging_ListTopics_Handler, |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
MethodName: "RequestTopicPartitions", |
|
|
MethodName: "RequestTopicPartitions", |
|
|
Handler: _SeaweedMessaging_RequestTopicPartitions_Handler, |
|
|
Handler: _SeaweedMessaging_RequestTopicPartitions_Handler, |
|
|