Documentation ¶
Overview ¶
Package pbkafka is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterKafkaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterKafkaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KafkaServiceClient) error
- func RegisterKafkaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterKafkaServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KafkaServiceServer) error
- func RegisterKafkaServiceServer(s grpc.ServiceRegistrar, srv KafkaServiceServer)
- type KafkaInstance
- func (*KafkaInstance) Descriptor() ([]byte, []int)deprecated
- func (x *KafkaInstance) GetAccoutName() string
- func (x *KafkaInstance) GetCreateTime() string
- func (x *KafkaInstance) GetDistSize() int32
- func (x *KafkaInstance) GetEndPoint() string
- func (x *KafkaInstance) GetExpiredTime() string
- func (x *KafkaInstance) GetInstanceId() string
- func (x *KafkaInstance) GetInstanceName() string
- func (x *KafkaInstance) GetProvider() pbtenant.CloudProvider
- func (x *KafkaInstance) GetRegionName() string
- func (x *KafkaInstance) GetStatus() string
- func (x *KafkaInstance) GetTopicNumLimit() int32
- func (*KafkaInstance) ProtoMessage()
- func (x *KafkaInstance) ProtoReflect() protoreflect.Message
- func (x *KafkaInstance) Reset()
- func (x *KafkaInstance) String() string
- type KafkaServiceClient
- type KafkaServiceServer
- type ListDetailReq
- func (*ListDetailReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListDetailReq) GetAccountName() string
- func (x *ListDetailReq) GetNextToken() string
- func (x *ListDetailReq) GetPageNumber() int32
- func (x *ListDetailReq) GetPageSize() int32
- func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider
- func (x *ListDetailReq) GetRegionId() int32
- func (*ListDetailReq) ProtoMessage()
- func (x *ListDetailReq) ProtoReflect() protoreflect.Message
- func (x *ListDetailReq) Reset()
- func (x *ListDetailReq) String() string
- type ListDetailResp
- func (*ListDetailResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListDetailResp) GetFinished() bool
- func (x *ListDetailResp) GetKafkas() []*KafkaInstance
- func (x *ListDetailResp) GetNextToken() string
- func (x *ListDetailResp) GetPageNumber() int32
- func (x *ListDetailResp) GetPageSize() int32
- func (x *ListDetailResp) GetRequestId() string
- func (*ListDetailResp) ProtoMessage()
- func (x *ListDetailResp) ProtoReflect() protoreflect.Message
- func (x *ListDetailResp) Reset()
- func (x *ListDetailResp) String() string
- type ListReq
- type ListResp
- type UnimplementedKafkaServiceServer
- type UnsafeKafkaServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_idl_pbkafka_kafka_proto protoreflect.FileDescriptor
var KafkaService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbkafka.KafkaService", HandlerType: (*KafkaServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListKafkaDetail", Handler: _KafkaService_ListKafkaDetail_Handler, }, { MethodName: "ListKafka", Handler: _KafkaService_ListKafka_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/pbkafka/kafka.proto", }
KafkaService_ServiceDesc is the grpc.ServiceDesc for KafkaService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKafkaServiceHandler ¶
func RegisterKafkaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterKafkaServiceHandler registers the http handlers for service KafkaService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterKafkaServiceHandlerClient ¶
func RegisterKafkaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KafkaServiceClient) error
RegisterKafkaServiceHandlerClient registers the http handlers for service KafkaService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KafkaServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KafkaServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "KafkaServiceClient" to call the correct interceptors.
func RegisterKafkaServiceHandlerFromEndpoint ¶
func RegisterKafkaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterKafkaServiceHandlerFromEndpoint is same as RegisterKafkaServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterKafkaServiceHandlerServer ¶
func RegisterKafkaServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KafkaServiceServer) error
RegisterKafkaServiceHandlerServer registers the http handlers for service KafkaService to "mux". UnaryRPC :call KafkaServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterKafkaServiceHandlerFromEndpoint instead.
func RegisterKafkaServiceServer ¶
func RegisterKafkaServiceServer(s grpc.ServiceRegistrar, srv KafkaServiceServer)
Types ¶
type KafkaInstance ¶
type KafkaInstance struct { // 云类型 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账号名称 AccoutName string `protobuf:"bytes,2,opt,name=accout_name,json=accoutName,proto3" json:"accout_name,omitempty"` // 实例id InstanceId string `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` // 实例名称 InstanceName string `protobuf:"bytes,4,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` // 地域,数据中心 RegionName string `protobuf:"bytes,5,opt,name=region_name,json=regionName,proto3" json:"region_name,omitempty"` // 默认接入点 EndPoint string `protobuf:"bytes,6,opt,name=end_point,json=endPoint,proto3" json:"end_point,omitempty"` // Topic最大数量 TopicNumLimit int32 `protobuf:"varint,7,opt,name=topic_num_limit,json=topicNumLimit,proto3" json:"topic_num_limit,omitempty"` // 磁盘容量 DistSize int32 `protobuf:"varint,8,opt,name=dist_size,json=distSize,proto3" json:"dist_size,omitempty"` // 状态 Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` // 创建时间,ISO8601 CreateTime string `protobuf:"bytes,10,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 过期时间 ExpiredTime string `protobuf:"bytes,11,opt,name=expired_time,json=expiredTime,proto3" json:"expired_time,omitempty"` // contains filtered or unexported fields }
func (*KafkaInstance) Descriptor
deprecated
func (*KafkaInstance) Descriptor() ([]byte, []int)
Deprecated: Use KafkaInstance.ProtoReflect.Descriptor instead.
func (*KafkaInstance) GetAccoutName ¶
func (x *KafkaInstance) GetAccoutName() string
func (*KafkaInstance) GetCreateTime ¶
func (x *KafkaInstance) GetCreateTime() string
func (*KafkaInstance) GetDistSize ¶
func (x *KafkaInstance) GetDistSize() int32
func (*KafkaInstance) GetEndPoint ¶
func (x *KafkaInstance) GetEndPoint() string
func (*KafkaInstance) GetExpiredTime ¶
func (x *KafkaInstance) GetExpiredTime() string
func (*KafkaInstance) GetInstanceId ¶
func (x *KafkaInstance) GetInstanceId() string
func (*KafkaInstance) GetInstanceName ¶
func (x *KafkaInstance) GetInstanceName() string
func (*KafkaInstance) GetProvider ¶
func (x *KafkaInstance) GetProvider() pbtenant.CloudProvider
func (*KafkaInstance) GetRegionName ¶
func (x *KafkaInstance) GetRegionName() string
func (*KafkaInstance) GetStatus ¶
func (x *KafkaInstance) GetStatus() string
func (*KafkaInstance) GetTopicNumLimit ¶
func (x *KafkaInstance) GetTopicNumLimit() int32
func (*KafkaInstance) ProtoMessage ¶
func (*KafkaInstance) ProtoMessage()
func (*KafkaInstance) ProtoReflect ¶
func (x *KafkaInstance) ProtoReflect() protoreflect.Message
func (*KafkaInstance) Reset ¶
func (x *KafkaInstance) Reset()
func (*KafkaInstance) String ¶
func (x *KafkaInstance) String() string
type KafkaServiceClient ¶
type KafkaServiceClient interface { // 查询Kafka明细 - 支持云类型、区域、账户、分页等过滤条件 ListKafkaDetail(ctx context.Context, in *ListDetailReq, opts ...grpc.CallOption) (*ListDetailResp, error) // 查询Kafka全量 - 根据云类型 ListKafka(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) }
KafkaServiceClient is the client API for KafkaService 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.
func NewKafkaServiceClient ¶
func NewKafkaServiceClient(cc grpc.ClientConnInterface) KafkaServiceClient
type KafkaServiceServer ¶
type KafkaServiceServer interface { // 查询Kafka明细 - 支持云类型、区域、账户、分页等过滤条件 ListKafkaDetail(context.Context, *ListDetailReq) (*ListDetailResp, error) // 查询Kafka全量 - 根据云类型 ListKafka(context.Context, *ListReq) (*ListResp, error) // contains filtered or unexported methods }
KafkaServiceServer is the server API for KafkaService service. All implementations must embed UnimplementedKafkaServiceServer for forward compatibility
type ListDetailReq ¶
type ListDetailReq struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 区域Id,参考 tenant.proto 中的各个云的区域 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` // 分页相关参数,页码 PageNumber int32 `protobuf:"varint,4,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // 分页相关参数,每页数量 PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 分页相关参数,下一页的token NextToken string `protobuf:"bytes,6,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` // contains filtered or unexported fields }
func (*ListDetailReq) Descriptor
deprecated
func (*ListDetailReq) Descriptor() ([]byte, []int)
Deprecated: Use ListDetailReq.ProtoReflect.Descriptor instead.
func (*ListDetailReq) GetAccountName ¶
func (x *ListDetailReq) GetAccountName() string
func (*ListDetailReq) GetNextToken ¶
func (x *ListDetailReq) GetNextToken() string
func (*ListDetailReq) GetPageNumber ¶
func (x *ListDetailReq) GetPageNumber() int32
func (*ListDetailReq) GetPageSize ¶
func (x *ListDetailReq) GetPageSize() int32
func (*ListDetailReq) GetProvider ¶
func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider
func (*ListDetailReq) GetRegionId ¶
func (x *ListDetailReq) GetRegionId() int32
func (*ListDetailReq) ProtoMessage ¶
func (*ListDetailReq) ProtoMessage()
func (*ListDetailReq) ProtoReflect ¶
func (x *ListDetailReq) ProtoReflect() protoreflect.Message
func (*ListDetailReq) Reset ¶
func (x *ListDetailReq) Reset()
func (*ListDetailReq) String ¶
func (x *ListDetailReq) String() string
type ListDetailResp ¶
type ListDetailResp struct { // kafka 机器集合 Kafkas []*KafkaInstance `protobuf:"bytes,1,rep,name=kafkas,proto3" json:"kafkas,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` // 分页相关参数,页码 PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // 分页相关参数,每页数量 PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 分页相关参数,下一页的token NextToken string `protobuf:"bytes,5,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` // 请求id,出现问题后提供给云厂商,排查问题 RequestId string `protobuf:"bytes,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
func (*ListDetailResp) Descriptor
deprecated
func (*ListDetailResp) Descriptor() ([]byte, []int)
Deprecated: Use ListDetailResp.ProtoReflect.Descriptor instead.
func (*ListDetailResp) GetFinished ¶
func (x *ListDetailResp) GetFinished() bool
func (*ListDetailResp) GetKafkas ¶
func (x *ListDetailResp) GetKafkas() []*KafkaInstance
func (*ListDetailResp) GetNextToken ¶
func (x *ListDetailResp) GetNextToken() string
func (*ListDetailResp) GetPageNumber ¶
func (x *ListDetailResp) GetPageNumber() int32
func (*ListDetailResp) GetPageSize ¶
func (x *ListDetailResp) GetPageSize() int32
func (*ListDetailResp) GetRequestId ¶
func (x *ListDetailResp) GetRequestId() string
func (*ListDetailResp) ProtoMessage ¶
func (*ListDetailResp) ProtoMessage()
func (*ListDetailResp) ProtoReflect ¶
func (x *ListDetailResp) ProtoReflect() protoreflect.Message
func (*ListDetailResp) Reset ¶
func (x *ListDetailResp) Reset()
func (*ListDetailResp) String ¶
func (x *ListDetailResp) String() string
type ListReq ¶
type ListReq struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // contains filtered or unexported fields }
func (*ListReq) Descriptor
deprecated
func (*ListReq) GetProvider ¶
func (x *ListReq) GetProvider() pbtenant.CloudProvider
func (*ListReq) ProtoMessage ¶
func (*ListReq) ProtoMessage()
func (*ListReq) ProtoReflect ¶
func (x *ListReq) ProtoReflect() protoreflect.Message
type ListResp ¶
type ListResp struct { // Kafka 机器集合 Kafkas []*KafkaInstance `protobuf:"bytes,1,rep,name=kafkas,proto3" json:"kafkas,omitempty"` // contains filtered or unexported fields }
func (*ListResp) Descriptor
deprecated
func (*ListResp) GetKafkas ¶
func (x *ListResp) GetKafkas() []*KafkaInstance
func (*ListResp) ProtoMessage ¶
func (*ListResp) ProtoMessage()
func (*ListResp) ProtoReflect ¶
func (x *ListResp) ProtoReflect() protoreflect.Message
type UnimplementedKafkaServiceServer ¶
type UnimplementedKafkaServiceServer struct { }
UnimplementedKafkaServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedKafkaServiceServer) ListKafkaDetail ¶
func (UnimplementedKafkaServiceServer) ListKafkaDetail(context.Context, *ListDetailReq) (*ListDetailResp, error)
type UnsafeKafkaServiceServer ¶
type UnsafeKafkaServiceServer interface {
// contains filtered or unexported methods
}
UnsafeKafkaServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KafkaServiceServer will result in compilation errors.