refactor: generate all go proto (#257)

Signed-off-by: zyy17 <zyylsxm@gmail.com>
This commit is contained in:
zyy17
2025-07-21 10:13:20 +08:00
committed by GitHub
parent dbfd68e984
commit 5976122c46
9 changed files with 5926 additions and 6 deletions
File diff suppressed because it is too large Load Diff
+185
View File
@@ -0,0 +1,185 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.6
// source: greptime/v1/flow/server.proto
package flow
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.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// FlowClient is the client API for Flow 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 FlowClient interface {
// Handle the control plane request for creating or removing a flow.
HandleCreateRemove(ctx context.Context, in *FlowRequest, opts ...grpc.CallOption) (*FlowResponse, error)
// Handle the data plane request for inserting or deleting rows
// only expect `RegionRequest` to be one of `InsertRequests` or
// `DeleteRequests` other types of `RegionRequest` will be ignored
HandleMirrorRequest(ctx context.Context, in *InsertRequests, opts ...grpc.CallOption) (*FlowResponse, error)
HandleMarkDirtyTimeWindow(ctx context.Context, in *DirtyWindowRequests, opts ...grpc.CallOption) (*FlowResponse, error)
}
type flowClient struct {
cc grpc.ClientConnInterface
}
func NewFlowClient(cc grpc.ClientConnInterface) FlowClient {
return &flowClient{cc}
}
func (c *flowClient) HandleCreateRemove(ctx context.Context, in *FlowRequest, opts ...grpc.CallOption) (*FlowResponse, error) {
out := new(FlowResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.flow.Flow/HandleCreateRemove", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *flowClient) HandleMirrorRequest(ctx context.Context, in *InsertRequests, opts ...grpc.CallOption) (*FlowResponse, error) {
out := new(FlowResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.flow.Flow/HandleMirrorRequest", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *flowClient) HandleMarkDirtyTimeWindow(ctx context.Context, in *DirtyWindowRequests, opts ...grpc.CallOption) (*FlowResponse, error) {
out := new(FlowResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.flow.Flow/HandleMarkDirtyTimeWindow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FlowServer is the server API for Flow service.
// All implementations must embed UnimplementedFlowServer
// for forward compatibility
type FlowServer interface {
// Handle the control plane request for creating or removing a flow.
HandleCreateRemove(context.Context, *FlowRequest) (*FlowResponse, error)
// Handle the data plane request for inserting or deleting rows
// only expect `RegionRequest` to be one of `InsertRequests` or
// `DeleteRequests` other types of `RegionRequest` will be ignored
HandleMirrorRequest(context.Context, *InsertRequests) (*FlowResponse, error)
HandleMarkDirtyTimeWindow(context.Context, *DirtyWindowRequests) (*FlowResponse, error)
mustEmbedUnimplementedFlowServer()
}
// UnimplementedFlowServer must be embedded to have forward compatible implementations.
type UnimplementedFlowServer struct {
}
func (UnimplementedFlowServer) HandleCreateRemove(context.Context, *FlowRequest) (*FlowResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HandleCreateRemove not implemented")
}
func (UnimplementedFlowServer) HandleMirrorRequest(context.Context, *InsertRequests) (*FlowResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HandleMirrorRequest not implemented")
}
func (UnimplementedFlowServer) HandleMarkDirtyTimeWindow(context.Context, *DirtyWindowRequests) (*FlowResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HandleMarkDirtyTimeWindow not implemented")
}
func (UnimplementedFlowServer) mustEmbedUnimplementedFlowServer() {}
// UnsafeFlowServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FlowServer will
// result in compilation errors.
type UnsafeFlowServer interface {
mustEmbedUnimplementedFlowServer()
}
func RegisterFlowServer(s grpc.ServiceRegistrar, srv FlowServer) {
s.RegisterService(&Flow_ServiceDesc, srv)
}
func _Flow_HandleCreateRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FlowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FlowServer).HandleCreateRemove(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.flow.Flow/HandleCreateRemove",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FlowServer).HandleCreateRemove(ctx, req.(*FlowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Flow_HandleMirrorRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InsertRequests)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FlowServer).HandleMirrorRequest(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.flow.Flow/HandleMirrorRequest",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FlowServer).HandleMirrorRequest(ctx, req.(*InsertRequests))
}
return interceptor(ctx, in, info, handler)
}
func _Flow_HandleMarkDirtyTimeWindow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DirtyWindowRequests)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FlowServer).HandleMarkDirtyTimeWindow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.flow.Flow/HandleMarkDirtyTimeWindow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FlowServer).HandleMarkDirtyTimeWindow(ctx, req.(*DirtyWindowRequests))
}
return interceptor(ctx, in, info, handler)
}
// Flow_ServiceDesc is the grpc.ServiceDesc for Flow service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Flow_ServiceDesc = grpc.ServiceDesc{
ServiceName: "greptime.v1.flow.Flow",
HandlerType: (*FlowServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "HandleCreateRemove",
Handler: _Flow_HandleCreateRemove_Handler,
},
{
MethodName: "HandleMirrorRequest",
Handler: _Flow_HandleMirrorRequest_Handler,
},
{
MethodName: "HandleMarkDirtyTimeWindow",
Handler: _Flow_HandleMarkDirtyTimeWindow_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greptime/v1/flow/server.proto",
}
+525
View File
@@ -0,0 +1,525 @@
// Copyright 2023 Greptime Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/frontend/server.proto
package frontend
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ListProcessRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Catalog string `protobuf:"bytes,1,opt,name=catalog,proto3" json:"catalog,omitempty"`
}
func (x *ListProcessRequest) Reset() {
*x = ListProcessRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListProcessRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListProcessRequest) ProtoMessage() {}
func (x *ListProcessRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListProcessRequest.ProtoReflect.Descriptor instead.
func (*ListProcessRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_frontend_server_proto_rawDescGZIP(), []int{0}
}
func (x *ListProcessRequest) GetCatalog() string {
if x != nil {
return x.Catalog
}
return ""
}
type ListProcessResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Processes []*ProcessInfo `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"`
}
func (x *ListProcessResponse) Reset() {
*x = ListProcessResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListProcessResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListProcessResponse) ProtoMessage() {}
func (x *ListProcessResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListProcessResponse.ProtoReflect.Descriptor instead.
func (*ListProcessResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_frontend_server_proto_rawDescGZIP(), []int{1}
}
func (x *ListProcessResponse) GetProcesses() []*ProcessInfo {
if x != nil {
return x.Processes
}
return nil
}
type KillProcessRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Frontend server address of process.
ServerAddr string `protobuf:"bytes,1,opt,name=server_addr,json=serverAddr,proto3" json:"server_addr,omitempty"`
// Catalog of process to kill.
Catalog string `protobuf:"bytes,2,opt,name=catalog,proto3" json:"catalog,omitempty"`
// ID of process to kill.
ProcessId uint32 `protobuf:"varint,3,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"`
}
func (x *KillProcessRequest) Reset() {
*x = KillProcessRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KillProcessRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KillProcessRequest) ProtoMessage() {}
func (x *KillProcessRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KillProcessRequest.ProtoReflect.Descriptor instead.
func (*KillProcessRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_frontend_server_proto_rawDescGZIP(), []int{2}
}
func (x *KillProcessRequest) GetServerAddr() string {
if x != nil {
return x.ServerAddr
}
return ""
}
func (x *KillProcessRequest) GetCatalog() string {
if x != nil {
return x.Catalog
}
return ""
}
func (x *KillProcessRequest) GetProcessId() uint32 {
if x != nil {
return x.ProcessId
}
return 0
}
type KillProcessResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether targeting process is successfully killed
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}
func (x *KillProcessResponse) Reset() {
*x = KillProcessResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KillProcessResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KillProcessResponse) ProtoMessage() {}
func (x *KillProcessResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KillProcessResponse.ProtoReflect.Descriptor instead.
func (*KillProcessResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_frontend_server_proto_rawDescGZIP(), []int{3}
}
func (x *KillProcessResponse) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
type ProcessInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// ID.
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// Catalog of process.
Catalog string `protobuf:"bytes,2,opt,name=catalog,proto3" json:"catalog,omitempty"`
// Involved schemas.
Schemas []string `protobuf:"bytes,3,rep,name=schemas,proto3" json:"schemas,omitempty"`
// Query string.
Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"`
// Start time.
StartTimestamp int64 `protobuf:"varint,5,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
// Client info.
Client string `protobuf:"bytes,6,opt,name=client,proto3" json:"client,omitempty"`
// Frontend info of process.
Frontend string `protobuf:"bytes,7,opt,name=frontend,proto3" json:"frontend,omitempty"`
}
func (x *ProcessInfo) Reset() {
*x = ProcessInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProcessInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProcessInfo) ProtoMessage() {}
func (x *ProcessInfo) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_frontend_server_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProcessInfo.ProtoReflect.Descriptor instead.
func (*ProcessInfo) Descriptor() ([]byte, []int) {
return file_greptime_v1_frontend_server_proto_rawDescGZIP(), []int{4}
}
func (x *ProcessInfo) GetId() uint32 {
if x != nil {
return x.Id
}
return 0
}
func (x *ProcessInfo) GetCatalog() string {
if x != nil {
return x.Catalog
}
return ""
}
func (x *ProcessInfo) GetSchemas() []string {
if x != nil {
return x.Schemas
}
return nil
}
func (x *ProcessInfo) GetQuery() string {
if x != nil {
return x.Query
}
return ""
}
func (x *ProcessInfo) GetStartTimestamp() int64 {
if x != nil {
return x.StartTimestamp
}
return 0
}
func (x *ProcessInfo) GetClient() string {
if x != nil {
return x.Client
}
return ""
}
func (x *ProcessInfo) GetFrontend() string {
if x != nil {
return x.Frontend
}
return ""
}
var File_greptime_v1_frontend_server_proto protoreflect.FileDescriptor
var file_greptime_v1_frontend_server_proto_rawDesc = []byte{
0x0a, 0x21, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x22, 0x2e, 0x0a, 0x12, 0x4c, 0x69, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x22, 0x56, 0x0a, 0x13, 0x4c, 0x69, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x3f, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65,
0x73, 0x22, 0x6e, 0x0a, 0x12, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61,
0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c,
0x6f, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49,
0x64, 0x22, 0x2f, 0x0a, 0x13, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02,
0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07,
0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f,
0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a,
0x08, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x32, 0xd2, 0x01, 0x0a, 0x08, 0x46, 0x72,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x12, 0x62, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72,
0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x29, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x66, 0x72,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0b, 0x4b, 0x69,
0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64,
0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x50,
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x61,
0x0a, 0x17, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x42, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65,
0x72, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_greptime_v1_frontend_server_proto_rawDescOnce sync.Once
file_greptime_v1_frontend_server_proto_rawDescData = file_greptime_v1_frontend_server_proto_rawDesc
)
func file_greptime_v1_frontend_server_proto_rawDescGZIP() []byte {
file_greptime_v1_frontend_server_proto_rawDescOnce.Do(func() {
file_greptime_v1_frontend_server_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_frontend_server_proto_rawDescData)
})
return file_greptime_v1_frontend_server_proto_rawDescData
}
var file_greptime_v1_frontend_server_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_greptime_v1_frontend_server_proto_goTypes = []interface{}{
(*ListProcessRequest)(nil), // 0: greptime.v1.frontend.ListProcessRequest
(*ListProcessResponse)(nil), // 1: greptime.v1.frontend.ListProcessResponse
(*KillProcessRequest)(nil), // 2: greptime.v1.frontend.KillProcessRequest
(*KillProcessResponse)(nil), // 3: greptime.v1.frontend.KillProcessResponse
(*ProcessInfo)(nil), // 4: greptime.v1.frontend.ProcessInfo
}
var file_greptime_v1_frontend_server_proto_depIdxs = []int32{
4, // 0: greptime.v1.frontend.ListProcessResponse.processes:type_name -> greptime.v1.frontend.ProcessInfo
0, // 1: greptime.v1.frontend.Frontend.ListProcess:input_type -> greptime.v1.frontend.ListProcessRequest
2, // 2: greptime.v1.frontend.Frontend.KillProcess:input_type -> greptime.v1.frontend.KillProcessRequest
1, // 3: greptime.v1.frontend.Frontend.ListProcess:output_type -> greptime.v1.frontend.ListProcessResponse
3, // 4: greptime.v1.frontend.Frontend.KillProcess:output_type -> greptime.v1.frontend.KillProcessResponse
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_greptime_v1_frontend_server_proto_init() }
func file_greptime_v1_frontend_server_proto_init() {
if File_greptime_v1_frontend_server_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_greptime_v1_frontend_server_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListProcessRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_frontend_server_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListProcessResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_frontend_server_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KillProcessRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_frontend_server_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KillProcessResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_frontend_server_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProcessInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_frontend_server_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_greptime_v1_frontend_server_proto_goTypes,
DependencyIndexes: file_greptime_v1_frontend_server_proto_depIdxs,
MessageInfos: file_greptime_v1_frontend_server_proto_msgTypes,
}.Build()
File_greptime_v1_frontend_server_proto = out.File
file_greptime_v1_frontend_server_proto_rawDesc = nil
file_greptime_v1_frontend_server_proto_goTypes = nil
file_greptime_v1_frontend_server_proto_depIdxs = nil
}
+145
View File
@@ -0,0 +1,145 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.6
// source: greptime/v1/frontend/server.proto
package frontend
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.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// FrontendClient is the client API for Frontend 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 FrontendClient interface {
// List all running processes on frontend.
ListProcess(ctx context.Context, in *ListProcessRequest, opts ...grpc.CallOption) (*ListProcessResponse, error)
// Kill a running process on frontend.
KillProcess(ctx context.Context, in *KillProcessRequest, opts ...grpc.CallOption) (*KillProcessResponse, error)
}
type frontendClient struct {
cc grpc.ClientConnInterface
}
func NewFrontendClient(cc grpc.ClientConnInterface) FrontendClient {
return &frontendClient{cc}
}
func (c *frontendClient) ListProcess(ctx context.Context, in *ListProcessRequest, opts ...grpc.CallOption) (*ListProcessResponse, error) {
out := new(ListProcessResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.frontend.Frontend/ListProcess", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *frontendClient) KillProcess(ctx context.Context, in *KillProcessRequest, opts ...grpc.CallOption) (*KillProcessResponse, error) {
out := new(KillProcessResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.frontend.Frontend/KillProcess", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FrontendServer is the server API for Frontend service.
// All implementations must embed UnimplementedFrontendServer
// for forward compatibility
type FrontendServer interface {
// List all running processes on frontend.
ListProcess(context.Context, *ListProcessRequest) (*ListProcessResponse, error)
// Kill a running process on frontend.
KillProcess(context.Context, *KillProcessRequest) (*KillProcessResponse, error)
mustEmbedUnimplementedFrontendServer()
}
// UnimplementedFrontendServer must be embedded to have forward compatible implementations.
type UnimplementedFrontendServer struct {
}
func (UnimplementedFrontendServer) ListProcess(context.Context, *ListProcessRequest) (*ListProcessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListProcess not implemented")
}
func (UnimplementedFrontendServer) KillProcess(context.Context, *KillProcessRequest) (*KillProcessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method KillProcess not implemented")
}
func (UnimplementedFrontendServer) mustEmbedUnimplementedFrontendServer() {}
// UnsafeFrontendServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FrontendServer will
// result in compilation errors.
type UnsafeFrontendServer interface {
mustEmbedUnimplementedFrontendServer()
}
func RegisterFrontendServer(s grpc.ServiceRegistrar, srv FrontendServer) {
s.RegisterService(&Frontend_ServiceDesc, srv)
}
func _Frontend_ListProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListProcessRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FrontendServer).ListProcess(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.frontend.Frontend/ListProcess",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FrontendServer).ListProcess(ctx, req.(*ListProcessRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Frontend_KillProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(KillProcessRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FrontendServer).KillProcess(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.frontend.Frontend/KillProcess",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FrontendServer).KillProcess(ctx, req.(*KillProcessRequest))
}
return interceptor(ctx, in, info, handler)
}
// Frontend_ServiceDesc is the grpc.ServiceDesc for Frontend service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Frontend_ServiceDesc = grpc.ServiceDesc{
ServiceName: "greptime.v1.frontend.Frontend",
HandlerType: (*FrontendServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListProcess",
Handler: _Frontend_ListProcess_Handler,
},
{
MethodName: "KillProcess",
Handler: _Frontend_KillProcess_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greptime/v1/frontend/server.proto",
}
+311
View File
@@ -0,0 +1,311 @@
// Copyright 2023 Greptime Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/index/bloom_filter.proto
package index
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// BloomFilterMeta defines the metadata for a bloom filter.
type BloomFilterMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The number of rows per segment.
RowsPerSegment uint64 `protobuf:"varint,1,opt,name=rows_per_segment,json=rowsPerSegment,proto3" json:"rows_per_segment,omitempty"`
// The number of segments.
SegmentCount uint64 `protobuf:"varint,2,opt,name=segment_count,json=segmentCount,proto3" json:"segment_count,omitempty"`
// The number of total rows.
RowCount uint64 `protobuf:"varint,3,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"`
// The size of the bloom filter in bytes excluding the metadata.
BloomFilterSize uint64 `protobuf:"varint,4,opt,name=bloom_filter_size,json=bloomFilterSize,proto3" json:"bloom_filter_size,omitempty"`
// The indices to the bloom filter location of each segment.
SegmentLocIndices []uint64 `protobuf:"varint,5,rep,packed,name=segment_loc_indices,json=segmentLocIndices,proto3" json:"segment_loc_indices,omitempty"`
// The bloom filter locations.
BloomFilterLocs []*BloomFilterLoc `protobuf:"bytes,6,rep,name=bloom_filter_locs,json=bloomFilterLocs,proto3" json:"bloom_filter_locs,omitempty"`
}
func (x *BloomFilterMeta) Reset() {
*x = BloomFilterMeta{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_index_bloom_filter_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BloomFilterMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BloomFilterMeta) ProtoMessage() {}
func (x *BloomFilterMeta) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_index_bloom_filter_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BloomFilterMeta.ProtoReflect.Descriptor instead.
func (*BloomFilterMeta) Descriptor() ([]byte, []int) {
return file_greptime_v1_index_bloom_filter_proto_rawDescGZIP(), []int{0}
}
func (x *BloomFilterMeta) GetRowsPerSegment() uint64 {
if x != nil {
return x.RowsPerSegment
}
return 0
}
func (x *BloomFilterMeta) GetSegmentCount() uint64 {
if x != nil {
return x.SegmentCount
}
return 0
}
func (x *BloomFilterMeta) GetRowCount() uint64 {
if x != nil {
return x.RowCount
}
return 0
}
func (x *BloomFilterMeta) GetBloomFilterSize() uint64 {
if x != nil {
return x.BloomFilterSize
}
return 0
}
func (x *BloomFilterMeta) GetSegmentLocIndices() []uint64 {
if x != nil {
return x.SegmentLocIndices
}
return nil
}
func (x *BloomFilterMeta) GetBloomFilterLocs() []*BloomFilterLoc {
if x != nil {
return x.BloomFilterLocs
}
return nil
}
// BloomFilterLoc defines the location of a bloom filter.
type BloomFilterLoc struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The byte offset of the bloom filter data.
Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
// The size of the bloom filter data.
Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
// The number of elements in the bloom filter.
ElementCount uint64 `protobuf:"varint,3,opt,name=element_count,json=elementCount,proto3" json:"element_count,omitempty"`
}
func (x *BloomFilterLoc) Reset() {
*x = BloomFilterLoc{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_index_bloom_filter_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BloomFilterLoc) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BloomFilterLoc) ProtoMessage() {}
func (x *BloomFilterLoc) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_index_bloom_filter_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BloomFilterLoc.ProtoReflect.Descriptor instead.
func (*BloomFilterLoc) Descriptor() ([]byte, []int) {
return file_greptime_v1_index_bloom_filter_proto_rawDescGZIP(), []int{1}
}
func (x *BloomFilterLoc) GetOffset() uint64 {
if x != nil {
return x.Offset
}
return 0
}
func (x *BloomFilterLoc) GetSize() uint64 {
if x != nil {
return x.Size
}
return 0
}
func (x *BloomFilterLoc) GetElementCount() uint64 {
if x != nil {
return x.ElementCount
}
return 0
}
var File_greptime_v1_index_bloom_filter_proto protoreflect.FileDescriptor
var file_greptime_v1_index_bloom_filter_proto_rawDesc = []byte{
0x0a, 0x24, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x2f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x42, 0x6c,
0x6f, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x28, 0x0a,
0x10, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x72, 0x6f, 0x77, 0x73, 0x50, 0x65, 0x72,
0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65,
0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c,
0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09,
0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
0x08, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x6c, 0x6f,
0x6f, 0x6d, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x74, 0x65,
0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74,
0x5f, 0x6c, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03,
0x28, 0x04, 0x52, 0x11, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x49, 0x6e,
0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x5f, 0x66,
0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x21, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x2e, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72,
0x4c, 0x6f, 0x63, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72,
0x4c, 0x6f, 0x63, 0x73, 0x22, 0x61, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x6f, 0x6d, 0x46, 0x69, 0x6c,
0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12,
0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69,
0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6c, 0x65, 0x6d, 0x65,
0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65,
0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31,
0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_greptime_v1_index_bloom_filter_proto_rawDescOnce sync.Once
file_greptime_v1_index_bloom_filter_proto_rawDescData = file_greptime_v1_index_bloom_filter_proto_rawDesc
)
func file_greptime_v1_index_bloom_filter_proto_rawDescGZIP() []byte {
file_greptime_v1_index_bloom_filter_proto_rawDescOnce.Do(func() {
file_greptime_v1_index_bloom_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_index_bloom_filter_proto_rawDescData)
})
return file_greptime_v1_index_bloom_filter_proto_rawDescData
}
var file_greptime_v1_index_bloom_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_greptime_v1_index_bloom_filter_proto_goTypes = []interface{}{
(*BloomFilterMeta)(nil), // 0: greptime.v1.index.BloomFilterMeta
(*BloomFilterLoc)(nil), // 1: greptime.v1.index.BloomFilterLoc
}
var file_greptime_v1_index_bloom_filter_proto_depIdxs = []int32{
1, // 0: greptime.v1.index.BloomFilterMeta.bloom_filter_locs:type_name -> greptime.v1.index.BloomFilterLoc
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_greptime_v1_index_bloom_filter_proto_init() }
func file_greptime_v1_index_bloom_filter_proto_init() {
if File_greptime_v1_index_bloom_filter_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_greptime_v1_index_bloom_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BloomFilterMeta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_index_bloom_filter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BloomFilterLoc); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_index_bloom_filter_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_greptime_v1_index_bloom_filter_proto_goTypes,
DependencyIndexes: file_greptime_v1_index_bloom_filter_proto_depIdxs,
MessageInfos: file_greptime_v1_index_bloom_filter_proto_msgTypes,
}.Build()
File_greptime_v1_index_bloom_filter_proto = out.File
file_greptime_v1_index_bloom_filter_proto_rawDesc = nil
file_greptime_v1_index_bloom_filter_proto_goTypes = nil
file_greptime_v1_index_bloom_filter_proto_depIdxs = nil
}
+520
View File
@@ -0,0 +1,520 @@
// Copyright 2023 Greptime Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/index/inverted_index.proto
package index
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// BitmapType defines the type of bitmap used for indexing.
type BitmapType int32
const (
BitmapType_BitVec BitmapType = 0
BitmapType_Roaring BitmapType = 1
)
// Enum value maps for BitmapType.
var (
BitmapType_name = map[int32]string{
0: "BitVec",
1: "Roaring",
}
BitmapType_value = map[string]int32{
"BitVec": 0,
"Roaring": 1,
}
)
func (x BitmapType) Enum() *BitmapType {
p := new(BitmapType)
*p = x
return p
}
func (x BitmapType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (BitmapType) Descriptor() protoreflect.EnumDescriptor {
return file_greptime_v1_index_inverted_index_proto_enumTypes[0].Descriptor()
}
func (BitmapType) Type() protoreflect.EnumType {
return &file_greptime_v1_index_inverted_index_proto_enumTypes[0]
}
func (x BitmapType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use BitmapType.Descriptor instead.
func (BitmapType) EnumDescriptor() ([]byte, []int) {
return file_greptime_v1_index_inverted_index_proto_rawDescGZIP(), []int{0}
}
// InvertedIndexMetas defines the metadata for an inverted index
// within an inverted index blob.
type InvertedIndexMetas struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A map of tag names to their respective metadata corresponding to an individual
// inverted index within the inverted index blob.
Metas map[string]*InvertedIndexMeta `protobuf:"bytes,1,rep,name=metas,proto3" json:"metas,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The total count of rows within the inverted index blob.
// This is used to determine the number of segments within the bitmap.
TotalRowCount uint64 `protobuf:"varint,2,opt,name=total_row_count,json=totalRowCount,proto3" json:"total_row_count,omitempty"`
// The number of rows per group for bitmap indexing which determines how rows are
// batched for indexing. Each batch corresponds to a segment in the bitmap and allows
// for efficient retrieval during queries by reducing the search space.
SegmentRowCount uint64 `protobuf:"varint,3,opt,name=segment_row_count,json=segmentRowCount,proto3" json:"segment_row_count,omitempty"`
}
func (x *InvertedIndexMetas) Reset() {
*x = InvertedIndexMetas{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_index_inverted_index_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InvertedIndexMetas) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InvertedIndexMetas) ProtoMessage() {}
func (x *InvertedIndexMetas) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_index_inverted_index_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InvertedIndexMetas.ProtoReflect.Descriptor instead.
func (*InvertedIndexMetas) Descriptor() ([]byte, []int) {
return file_greptime_v1_index_inverted_index_proto_rawDescGZIP(), []int{0}
}
func (x *InvertedIndexMetas) GetMetas() map[string]*InvertedIndexMeta {
if x != nil {
return x.Metas
}
return nil
}
func (x *InvertedIndexMetas) GetTotalRowCount() uint64 {
if x != nil {
return x.TotalRowCount
}
return 0
}
func (x *InvertedIndexMetas) GetSegmentRowCount() uint64 {
if x != nil {
return x.SegmentRowCount
}
return 0
}
// InvertedIndexMeta contains the metadata for a specific tag's inverted index.
type InvertedIndexMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the tag associated with the inverted index.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The base byte offset for this tag's inverted index data within the blob.
// Other offsets in this message are relative to this base offset.
BaseOffset uint64 `protobuf:"varint,2,opt,name=base_offset,json=baseOffset,proto3" json:"base_offset,omitempty"`
// The total size in bytes of this tag's inverted index data, including bitmaps,
// FST data.
InvertedIndexSize uint64 `protobuf:"varint,3,opt,name=inverted_index_size,json=invertedIndexSize,proto3" json:"inverted_index_size,omitempty"`
// The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
RelativeFstOffset uint32 `protobuf:"varint,4,opt,name=relative_fst_offset,json=relativeFstOffset,proto3" json:"relative_fst_offset,omitempty"`
// The size in bytes of the FST data.
FstSize uint32 `protobuf:"varint,5,opt,name=fst_size,json=fstSize,proto3" json:"fst_size,omitempty"`
// The byte offset relative to the `base_offset` where the null bitmap for this tag
// starts.
RelativeNullBitmapOffset uint32 `protobuf:"varint,6,opt,name=relative_null_bitmap_offset,json=relativeNullBitmapOffset,proto3" json:"relative_null_bitmap_offset,omitempty"`
// The size in bytes of the null bitmap.
NullBitmapSize uint32 `protobuf:"varint,7,opt,name=null_bitmap_size,json=nullBitmapSize,proto3" json:"null_bitmap_size,omitempty"`
// Statistical information about the tag's inverted index.
Stats *InvertedIndexStats `protobuf:"bytes,8,opt,name=stats,proto3" json:"stats,omitempty"`
// The type of bitmap used for indexing.
BitmapType BitmapType `protobuf:"varint,9,opt,name=bitmap_type,json=bitmapType,proto3,enum=greptime.v1.index.BitmapType" json:"bitmap_type,omitempty"`
}
func (x *InvertedIndexMeta) Reset() {
*x = InvertedIndexMeta{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_index_inverted_index_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InvertedIndexMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InvertedIndexMeta) ProtoMessage() {}
func (x *InvertedIndexMeta) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_index_inverted_index_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InvertedIndexMeta.ProtoReflect.Descriptor instead.
func (*InvertedIndexMeta) Descriptor() ([]byte, []int) {
return file_greptime_v1_index_inverted_index_proto_rawDescGZIP(), []int{1}
}
func (x *InvertedIndexMeta) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *InvertedIndexMeta) GetBaseOffset() uint64 {
if x != nil {
return x.BaseOffset
}
return 0
}
func (x *InvertedIndexMeta) GetInvertedIndexSize() uint64 {
if x != nil {
return x.InvertedIndexSize
}
return 0
}
func (x *InvertedIndexMeta) GetRelativeFstOffset() uint32 {
if x != nil {
return x.RelativeFstOffset
}
return 0
}
func (x *InvertedIndexMeta) GetFstSize() uint32 {
if x != nil {
return x.FstSize
}
return 0
}
func (x *InvertedIndexMeta) GetRelativeNullBitmapOffset() uint32 {
if x != nil {
return x.RelativeNullBitmapOffset
}
return 0
}
func (x *InvertedIndexMeta) GetNullBitmapSize() uint32 {
if x != nil {
return x.NullBitmapSize
}
return 0
}
func (x *InvertedIndexMeta) GetStats() *InvertedIndexStats {
if x != nil {
return x.Stats
}
return nil
}
func (x *InvertedIndexMeta) GetBitmapType() BitmapType {
if x != nil {
return x.BitmapType
}
return BitmapType_BitVec
}
// InvertedIndexStats provides statistical data on a tag's inverted index.
type InvertedIndexStats struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The count of null entries within the tag's column.
NullCount uint64 `protobuf:"varint,1,opt,name=null_count,json=nullCount,proto3" json:"null_count,omitempty"`
// The number of distinct values within the tag's column.
DistinctCount uint64 `protobuf:"varint,2,opt,name=distinct_count,json=distinctCount,proto3" json:"distinct_count,omitempty"`
// The minimum value found within the tag's column, encoded as bytes.
MinValue []byte `protobuf:"bytes,3,opt,name=min_value,json=minValue,proto3" json:"min_value,omitempty"`
// The maximum value found within the tag's column, encoded as bytes.
MaxValue []byte `protobuf:"bytes,4,opt,name=max_value,json=maxValue,proto3" json:"max_value,omitempty"`
}
func (x *InvertedIndexStats) Reset() {
*x = InvertedIndexStats{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_index_inverted_index_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InvertedIndexStats) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InvertedIndexStats) ProtoMessage() {}
func (x *InvertedIndexStats) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_index_inverted_index_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InvertedIndexStats.ProtoReflect.Descriptor instead.
func (*InvertedIndexStats) Descriptor() ([]byte, []int) {
return file_greptime_v1_index_inverted_index_proto_rawDescGZIP(), []int{2}
}
func (x *InvertedIndexStats) GetNullCount() uint64 {
if x != nil {
return x.NullCount
}
return 0
}
func (x *InvertedIndexStats) GetDistinctCount() uint64 {
if x != nil {
return x.DistinctCount
}
return 0
}
func (x *InvertedIndexStats) GetMinValue() []byte {
if x != nil {
return x.MinValue
}
return nil
}
func (x *InvertedIndexStats) GetMaxValue() []byte {
if x != nil {
return x.MaxValue
}
return nil
}
var File_greptime_v1_index_inverted_index_proto protoreflect.FileDescriptor
var file_greptime_v1_index_inverted_index_proto_rawDesc = []byte{
0x0a, 0x26, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64,
0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x90, 0x02, 0x0a, 0x12,
0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74,
0x61, 0x73, 0x12, 0x46, 0x0a, 0x05, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x49, 0x6e,
0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x05, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f,
0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x73,
0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x5e,
0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3a,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x2e, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d,
0x65, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa9,
0x03, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78,
0x4d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x73, 0x65,
0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x62,
0x61, 0x73, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x6e, 0x76,
0x65, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x6c,
0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x73, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65,
0x46, 0x73, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x73, 0x74,
0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x66, 0x73, 0x74,
0x53, 0x69, 0x7a, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65,
0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x5f, 0x6f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x72, 0x65, 0x6c, 0x61, 0x74,
0x69, 0x76, 0x65, 0x4e, 0x75, 0x6c, 0x6c, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x4f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x62, 0x69, 0x74, 0x6d,
0x61, 0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6e,
0x75, 0x6c, 0x6c, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3b, 0x0a,
0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78,
0x2e, 0x49, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74,
0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x62, 0x69,
0x74, 0x6d, 0x61, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x2e, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a,
0x62, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x12, 0x49,
0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74,
0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e,
0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x2a, 0x25, 0x0a, 0x0a, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x0a, 0x0a, 0x06, 0x42, 0x69, 0x74, 0x56, 0x65, 0x63, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52,
0x6f, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54,
0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76,
0x31, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_greptime_v1_index_inverted_index_proto_rawDescOnce sync.Once
file_greptime_v1_index_inverted_index_proto_rawDescData = file_greptime_v1_index_inverted_index_proto_rawDesc
)
func file_greptime_v1_index_inverted_index_proto_rawDescGZIP() []byte {
file_greptime_v1_index_inverted_index_proto_rawDescOnce.Do(func() {
file_greptime_v1_index_inverted_index_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_index_inverted_index_proto_rawDescData)
})
return file_greptime_v1_index_inverted_index_proto_rawDescData
}
var file_greptime_v1_index_inverted_index_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_greptime_v1_index_inverted_index_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_greptime_v1_index_inverted_index_proto_goTypes = []interface{}{
(BitmapType)(0), // 0: greptime.v1.index.BitmapType
(*InvertedIndexMetas)(nil), // 1: greptime.v1.index.InvertedIndexMetas
(*InvertedIndexMeta)(nil), // 2: greptime.v1.index.InvertedIndexMeta
(*InvertedIndexStats)(nil), // 3: greptime.v1.index.InvertedIndexStats
nil, // 4: greptime.v1.index.InvertedIndexMetas.MetasEntry
}
var file_greptime_v1_index_inverted_index_proto_depIdxs = []int32{
4, // 0: greptime.v1.index.InvertedIndexMetas.metas:type_name -> greptime.v1.index.InvertedIndexMetas.MetasEntry
3, // 1: greptime.v1.index.InvertedIndexMeta.stats:type_name -> greptime.v1.index.InvertedIndexStats
0, // 2: greptime.v1.index.InvertedIndexMeta.bitmap_type:type_name -> greptime.v1.index.BitmapType
2, // 3: greptime.v1.index.InvertedIndexMetas.MetasEntry.value:type_name -> greptime.v1.index.InvertedIndexMeta
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_greptime_v1_index_inverted_index_proto_init() }
func file_greptime_v1_index_inverted_index_proto_init() {
if File_greptime_v1_index_inverted_index_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_greptime_v1_index_inverted_index_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InvertedIndexMetas); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_index_inverted_index_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InvertedIndexMeta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_index_inverted_index_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InvertedIndexStats); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_index_inverted_index_proto_rawDesc,
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_greptime_v1_index_inverted_index_proto_goTypes,
DependencyIndexes: file_greptime_v1_index_inverted_index_proto_depIdxs,
EnumInfos: file_greptime_v1_index_inverted_index_proto_enumTypes,
MessageInfos: file_greptime_v1_index_inverted_index_proto_msgTypes,
}.Build()
File_greptime_v1_index_inverted_index_proto = out.File
file_greptime_v1_index_inverted_index_proto_rawDesc = nil
file_greptime_v1_index_inverted_index_proto_goTypes = nil
file_greptime_v1_index_inverted_index_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
+105
View File
@@ -0,0 +1,105 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.6
// source: greptime/v1/region/server.proto
package region
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.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// RegionClient is the client API for Region 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 RegionClient interface {
Handle(ctx context.Context, in *RegionRequest, opts ...grpc.CallOption) (*RegionResponse, error)
}
type regionClient struct {
cc grpc.ClientConnInterface
}
func NewRegionClient(cc grpc.ClientConnInterface) RegionClient {
return &regionClient{cc}
}
func (c *regionClient) Handle(ctx context.Context, in *RegionRequest, opts ...grpc.CallOption) (*RegionResponse, error) {
out := new(RegionResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.region.Region/Handle", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RegionServer is the server API for Region service.
// All implementations must embed UnimplementedRegionServer
// for forward compatibility
type RegionServer interface {
Handle(context.Context, *RegionRequest) (*RegionResponse, error)
mustEmbedUnimplementedRegionServer()
}
// UnimplementedRegionServer must be embedded to have forward compatible implementations.
type UnimplementedRegionServer struct {
}
func (UnimplementedRegionServer) Handle(context.Context, *RegionRequest) (*RegionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Handle not implemented")
}
func (UnimplementedRegionServer) mustEmbedUnimplementedRegionServer() {}
// UnsafeRegionServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RegionServer will
// result in compilation errors.
type UnsafeRegionServer interface {
mustEmbedUnimplementedRegionServer()
}
func RegisterRegionServer(s grpc.ServiceRegistrar, srv RegionServer) {
s.RegisterService(&Region_ServiceDesc, srv)
}
func _Region_Handle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegionServer).Handle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.region.Region/Handle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegionServer).Handle(ctx, req.(*RegionRequest))
}
return interceptor(ctx, in, info, handler)
}
// Region_ServiceDesc is the grpc.ServiceDesc for Region service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Region_ServiceDesc = grpc.ServiceDesc{
ServiceName: "greptime.v1.region.Region",
HandlerType: (*RegionServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Handle",
Handler: _Region_Handle_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greptime/v1/region/server.proto",
}
+2 -6
View File
@@ -7,15 +7,11 @@ GO_OUTPUT=./go
# TODO(zyy17): Can we make the following commands as one command? # TODO(zyy17): Can we make the following commands as one command?
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \ protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \ --go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/greptime/v1/meta/*.proto -Iproto proto/greptime/v1/**/*.proto
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \ protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \ --go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/greptime/v1/*.proto -Iproto proto/prometheus/**/*.proto
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/prometheus/remote/*.proto
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \ protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \ --go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \