mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
370 lines
13 KiB
Go
370 lines
13 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: pkg/master/grpc/master/master.proto
|
|
|
|
package master
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
message "github.com/czs007/suvlim/pkg/master/grpc/message"
|
|
proto "github.com/golang/protobuf/proto"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type Collection struct {
|
|
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Schema *message.Schema `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
|
|
CreateTime uint64 `protobuf:"varint,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
|
SegmentIds []uint64 `protobuf:"varint,5,rep,packed,name=segment_ids,json=segmentIds,proto3" json:"segment_ids,omitempty"`
|
|
PartitionTags []string `protobuf:"bytes,6,rep,name=partition_tags,json=partitionTags,proto3" json:"partition_tags,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Collection) Reset() { *m = Collection{} }
|
|
func (m *Collection) String() string { return proto.CompactTextString(m) }
|
|
func (*Collection) ProtoMessage() {}
|
|
func (*Collection) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_64c7f42561e95429, []int{0}
|
|
}
|
|
|
|
func (m *Collection) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Collection.Unmarshal(m, b)
|
|
}
|
|
func (m *Collection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Collection.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *Collection) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Collection.Merge(m, src)
|
|
}
|
|
func (m *Collection) XXX_Size() int {
|
|
return xxx_messageInfo_Collection.Size(m)
|
|
}
|
|
func (m *Collection) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Collection.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Collection proto.InternalMessageInfo
|
|
|
|
func (m *Collection) GetId() uint64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Collection) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Collection) GetSchema() *message.Schema {
|
|
if m != nil {
|
|
return m.Schema
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Collection) GetCreateTime() uint64 {
|
|
if m != nil {
|
|
return m.CreateTime
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Collection) GetSegmentIds() []uint64 {
|
|
if m != nil {
|
|
return m.SegmentIds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Collection) GetPartitionTags() []string {
|
|
if m != nil {
|
|
return m.PartitionTags
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Segment struct {
|
|
SegmentId uint64 `protobuf:"varint,1,opt,name=segment_id,json=segmentId,proto3" json:"segment_id,omitempty"`
|
|
CollectionId uint64 `protobuf:"varint,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
|
|
PartitionTag string `protobuf:"bytes,3,opt,name=partition_tag,json=partitionTag,proto3" json:"partition_tag,omitempty"`
|
|
ChannelStart int32 `protobuf:"varint,4,opt,name=channel_start,json=channelStart,proto3" json:"channel_start,omitempty"`
|
|
ChannelEnd int32 `protobuf:"varint,5,opt,name=channel_end,json=channelEnd,proto3" json:"channel_end,omitempty"`
|
|
OpenTimestamp uint64 `protobuf:"varint,6,opt,name=open_timestamp,json=openTimestamp,proto3" json:"open_timestamp,omitempty"`
|
|
CloseTimestamp uint64 `protobuf:"varint,7,opt,name=close_timestamp,json=closeTimestamp,proto3" json:"close_timestamp,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Segment) Reset() { *m = Segment{} }
|
|
func (m *Segment) String() string { return proto.CompactTextString(m) }
|
|
func (*Segment) ProtoMessage() {}
|
|
func (*Segment) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_64c7f42561e95429, []int{1}
|
|
}
|
|
|
|
func (m *Segment) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Segment.Unmarshal(m, b)
|
|
}
|
|
func (m *Segment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Segment.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *Segment) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Segment.Merge(m, src)
|
|
}
|
|
func (m *Segment) XXX_Size() int {
|
|
return xxx_messageInfo_Segment.Size(m)
|
|
}
|
|
func (m *Segment) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Segment.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Segment proto.InternalMessageInfo
|
|
|
|
func (m *Segment) GetSegmentId() uint64 {
|
|
if m != nil {
|
|
return m.SegmentId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Segment) GetCollectionId() uint64 {
|
|
if m != nil {
|
|
return m.CollectionId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Segment) GetPartitionTag() string {
|
|
if m != nil {
|
|
return m.PartitionTag
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Segment) GetChannelStart() int32 {
|
|
if m != nil {
|
|
return m.ChannelStart
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Segment) GetChannelEnd() int32 {
|
|
if m != nil {
|
|
return m.ChannelEnd
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Segment) GetOpenTimestamp() uint64 {
|
|
if m != nil {
|
|
return m.OpenTimestamp
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Segment) GetCloseTimestamp() uint64 {
|
|
if m != nil {
|
|
return m.CloseTimestamp
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type SegmentStat struct {
|
|
SegmentId uint64 `protobuf:"varint,1,opt,name=segment_id,json=segmentId,proto3" json:"segment_id,omitempty"`
|
|
MemorySize uint64 `protobuf:"varint,2,opt,name=memory_size,json=memorySize,proto3" json:"memory_size,omitempty"`
|
|
MemoryRate float32 `protobuf:"fixed32,3,opt,name=memory_rate,json=memoryRate,proto3" json:"memory_rate,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SegmentStat) Reset() { *m = SegmentStat{} }
|
|
func (m *SegmentStat) String() string { return proto.CompactTextString(m) }
|
|
func (*SegmentStat) ProtoMessage() {}
|
|
func (*SegmentStat) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_64c7f42561e95429, []int{2}
|
|
}
|
|
|
|
func (m *SegmentStat) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_SegmentStat.Unmarshal(m, b)
|
|
}
|
|
func (m *SegmentStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_SegmentStat.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *SegmentStat) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SegmentStat.Merge(m, src)
|
|
}
|
|
func (m *SegmentStat) XXX_Size() int {
|
|
return xxx_messageInfo_SegmentStat.Size(m)
|
|
}
|
|
func (m *SegmentStat) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SegmentStat.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SegmentStat proto.InternalMessageInfo
|
|
|
|
func (m *SegmentStat) GetSegmentId() uint64 {
|
|
if m != nil {
|
|
return m.SegmentId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SegmentStat) GetMemorySize() uint64 {
|
|
if m != nil {
|
|
return m.MemorySize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SegmentStat) GetMemoryRate() float32 {
|
|
if m != nil {
|
|
return m.MemoryRate
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Collection)(nil), "masterpb.Collection")
|
|
proto.RegisterType((*Segment)(nil), "masterpb.Segment")
|
|
proto.RegisterType((*SegmentStat)(nil), "masterpb.SegmentStat")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("pkg/master/grpc/master/master.proto", fileDescriptor_64c7f42561e95429)
|
|
}
|
|
|
|
var fileDescriptor_64c7f42561e95429 = []byte{
|
|
// 447 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x6e, 0xd3, 0x40,
|
|
0x10, 0xc6, 0x89, 0x93, 0xb8, 0x64, 0xf2, 0x07, 0xb4, 0x70, 0xb0, 0x2a, 0xa1, 0x5a, 0xa9, 0x2a,
|
|
0x22, 0x21, 0xd9, 0xa5, 0x1c, 0x38, 0x22, 0x51, 0x71, 0xe8, 0xa1, 0x17, 0x3b, 0x27, 0x2e, 0xd6,
|
|
0xc6, 0x1e, 0x39, 0x2b, 0xb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e, 0x15, 0x6d, 0x77, 0x9b, 0x28, 0xaf, 0x75, 0x9c, 0xef,
|
|
0xdd, 0xf5, 0xf5, 0xe7, 0xd8, 0xed, 0x1e, 0x2a, 0xa5, 0xe3, 0xff, 0xe7, 0x7f, 0xe3, 0x73, 0x90,
|
|
0x3f, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x1d, 0xf9, 0x37, 0x20, 0x03, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// MasterClient is the client API for Master service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type MasterClient interface {
|
|
CreateCollection(ctx context.Context, in *message.Mapping, opts ...grpc.CallOption) (*message.Status, error)
|
|
}
|
|
|
|
type masterClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewMasterClient(cc *grpc.ClientConn) MasterClient {
|
|
return &masterClient{cc}
|
|
}
|
|
|
|
func (c *masterClient) CreateCollection(ctx context.Context, in *message.Mapping, opts ...grpc.CallOption) (*message.Status, error) {
|
|
out := new(message.Status)
|
|
err := c.cc.Invoke(ctx, "/masterpb.Master/CreateCollection", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// MasterServer is the server API for Master service.
|
|
type MasterServer interface {
|
|
CreateCollection(context.Context, *message.Mapping) (*message.Status, error)
|
|
}
|
|
|
|
// UnimplementedMasterServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedMasterServer struct {
|
|
}
|
|
|
|
func (*UnimplementedMasterServer) CreateCollection(ctx context.Context, req *message.Mapping) (*message.Status, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented")
|
|
}
|
|
|
|
func RegisterMasterServer(s *grpc.Server, srv MasterServer) {
|
|
s.RegisterService(&_Master_serviceDesc, srv)
|
|
}
|
|
|
|
func _Master_CreateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(message.Mapping)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MasterServer).CreateCollection(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/masterpb.Master/CreateCollection",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MasterServer).CreateCollection(ctx, req.(*message.Mapping))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Master_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "masterpb.Master",
|
|
HandlerType: (*MasterServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CreateCollection",
|
|
Handler: _Master_CreateCollection_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "pkg/master/grpc/master/master.proto",
|
|
}
|