master.pb.go 17.2 KB
Newer Older
Z
zhenshan.cao 已提交
1
// Code generated by protoc-gen-go. DO NOT EDIT.
Z
zhenshan.cao 已提交
2
// source: master.proto
Z
zhenshan.cao 已提交
3 4 5 6 7 8

package master

import (
	context "context"
	fmt "fmt"
9
	message "github.com/zilliztech/milvus-distributed/internal/proto/message"
Z
zhenshan.cao 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
	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

R
rain 已提交
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
type SegmentStatus int32

const (
	SegmentStatus_OPENED   SegmentStatus = 0
	SegmentStatus_CLOSED   SegmentStatus = 1
	SegmentStatus_INDEXING SegmentStatus = 2
	SegmentStatus_INDEXED  SegmentStatus = 3
)

var SegmentStatus_name = map[int32]string{
	0: "OPENED",
	1: "CLOSED",
	2: "INDEXING",
	3: "INDEXED",
}

var SegmentStatus_value = map[string]int32{
	"OPENED":   0,
	"CLOSED":   1,
	"INDEXING": 2,
	"INDEXED":  3,
}

func (x SegmentStatus) String() string {
	return proto.EnumName(SegmentStatus_name, int32(x))
}

func (SegmentStatus) EnumDescriptor() ([]byte, []int) {
Z
zhenshan.cao 已提交
56
	return fileDescriptor_f9c348dec43a6705, []int{0}
R
rain 已提交
57 58
}

Z
zhenshan.cao 已提交
59
type Collection struct {
60 61 62 63 64 65 66 67 68 69
	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"`
	Indexes              []*message.IndexParam `protobuf:"bytes,7,rep,name=indexes,proto3" json:"indexes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
Z
zhenshan.cao 已提交
70 71 72 73 74 75
}

func (m *Collection) Reset()         { *m = Collection{} }
func (m *Collection) String() string { return proto.CompactTextString(m) }
func (*Collection) ProtoMessage()    {}
func (*Collection) Descriptor() ([]byte, []int) {
Z
zhenshan.cao 已提交
76
	return fileDescriptor_f9c348dec43a6705, []int{0}
Z
zhenshan.cao 已提交
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
}

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
}

139 140 141 142 143 144 145
func (m *Collection) GetIndexes() []*message.IndexParam {
	if m != nil {
		return m.Indexes
	}
	return nil
}

Z
zhenshan.cao 已提交
146
type Segment struct {
R
rain 已提交
147 148 149 150 151 152 153 154
	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"`
	CollectionName       string        `protobuf:"bytes,8,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
Z
zhenshan.cao 已提交
155
	Status               SegmentStatus `protobuf:"varint,9,opt,name=status,proto3,enum=masterpb.SegmentStatus" json:"status,omitempty"`
R
rain 已提交
156 157 158 159
	Rows                 int64         `protobuf:"varint,10,opt,name=rows,proto3" json:"rows,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
Z
zhenshan.cao 已提交
160 161 162 163 164 165
}

func (m *Segment) Reset()         { *m = Segment{} }
func (m *Segment) String() string { return proto.CompactTextString(m) }
func (*Segment) ProtoMessage()    {}
func (*Segment) Descriptor() ([]byte, []int) {
Z
zhenshan.cao 已提交
166
	return fileDescriptor_f9c348dec43a6705, []int{1}
Z
zhenshan.cao 已提交
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
}

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
}

R
rain 已提交
236 237 238 239 240 241 242
func (m *Segment) GetCollectionName() string {
	if m != nil {
		return m.CollectionName
	}
	return ""
}

R
rain 已提交
243 244 245 246 247 248 249 250 251 252 253 254 255 256
func (m *Segment) GetStatus() SegmentStatus {
	if m != nil {
		return m.Status
	}
	return SegmentStatus_OPENED
}

func (m *Segment) GetRows() int64 {
	if m != nil {
		return m.Rows
	}
	return 0
}

Z
zhenshan.cao 已提交
257
type SegmentStat struct {
R
rain 已提交
258 259 260
	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"`
Z
zhenshan.cao 已提交
261
	Status               SegmentStatus `protobuf:"varint,4,opt,name=status,proto3,enum=masterpb.SegmentStatus" json:"status,omitempty"`
R
rain 已提交
262 263 264 265
	Rows                 int64         `protobuf:"varint,5,opt,name=rows,proto3" json:"rows,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
Z
zhenshan.cao 已提交
266 267 268 269 270 271
}

func (m *SegmentStat) Reset()         { *m = SegmentStat{} }
func (m *SegmentStat) String() string { return proto.CompactTextString(m) }
func (*SegmentStat) ProtoMessage()    {}
func (*SegmentStat) Descriptor() ([]byte, []int) {
Z
zhenshan.cao 已提交
272
	return fileDescriptor_f9c348dec43a6705, []int{2}
Z
zhenshan.cao 已提交
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
}

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
}

R
rain 已提交
314 315 316 317 318 319 320 321 322 323 324 325 326 327
func (m *SegmentStat) GetStatus() SegmentStatus {
	if m != nil {
		return m.Status
	}
	return SegmentStatus_OPENED
}

func (m *SegmentStat) GetRows() int64 {
	if m != nil {
		return m.Rows
	}
	return 0
}

Z
zhenshan.cao 已提交
328
func init() {
Z
zhenshan.cao 已提交
329 330 331 332
	proto.RegisterEnum("masterpb.SegmentStatus", SegmentStatus_name, SegmentStatus_value)
	proto.RegisterType((*Collection)(nil), "masterpb.Collection")
	proto.RegisterType((*Segment)(nil), "masterpb.Segment")
	proto.RegisterType((*SegmentStat)(nil), "masterpb.SegmentStat")
Z
zhenshan.cao 已提交
333 334
}

Z
zhenshan.cao 已提交
335
func init() { proto.RegisterFile("master.proto", fileDescriptor_f9c348dec43a6705) }
336

Z
zhenshan.cao 已提交
337
var fileDescriptor_f9c348dec43a6705 = []byte{
338
	// 586 bytes of a gzipped FileDescriptorProto
Z
zhenshan.cao 已提交
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375
	0x1f, 0x8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0x1d, 0xbd, 0x9b, 0xa9, 0xcd, 0x4d, 0xce, 0xc5, 0x8c, 0x4b, 0xcd, 0x2a,
	0x49, 0xf3, 0x19, 0x7e, 0x24, 0x66, 0x75, 0x58, 0x57, 0x0e, 0xee, 0xde, 0xfe, 0x09, 0x00, 0x00,
	0xff, 0xff, 0x6c, 0xc2, 0x7d, 0xd6, 0x5b, 0x04, 0x00, 0x00,
Z
zhenshan.cao 已提交
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
}

// 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)
391
	CreateIndex(ctx context.Context, in *message.IndexParam, opts ...grpc.CallOption) (*message.Status, error)
Z
zhenshan.cao 已提交
392 393 394 395 396 397 398 399 400 401 402 403
}

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)
Z
zhenshan.cao 已提交
404
	err := c.cc.Invoke(ctx, "/masterpb.Master/CreateCollection", in, out, opts...)
Z
zhenshan.cao 已提交
405 406 407 408 409 410
	if err != nil {
		return nil, err
	}
	return out, nil
}

411 412
func (c *masterClient) CreateIndex(ctx context.Context, in *message.IndexParam, opts ...grpc.CallOption) (*message.Status, error) {
	out := new(message.Status)
Z
zhenshan.cao 已提交
413
	err := c.cc.Invoke(ctx, "/masterpb.Master/CreateIndex", in, out, opts...)
414 415 416 417 418 419
	if err != nil {
		return nil, err
	}
	return out, nil
}

Z
zhenshan.cao 已提交
420 421 422
// MasterServer is the server API for Master service.
type MasterServer interface {
	CreateCollection(context.Context, *message.Mapping) (*message.Status, error)
423
	CreateIndex(context.Context, *message.IndexParam) (*message.Status, error)
Z
zhenshan.cao 已提交
424 425 426 427 428 429 430 431 432
}

// 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")
}
433 434 435
func (*UnimplementedMasterServer) CreateIndex(ctx context.Context, req *message.IndexParam) (*message.Status, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented")
}
Z
zhenshan.cao 已提交
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450

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,
Z
zhenshan.cao 已提交
451
		FullMethod: "/masterpb.Master/CreateCollection",
Z
zhenshan.cao 已提交
452 453 454 455 456 457 458
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MasterServer).CreateCollection(ctx, req.(*message.Mapping))
	}
	return interceptor(ctx, in, info, handler)
}

459 460 461 462 463 464 465 466 467 468
func _Master_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(message.IndexParam)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MasterServer).CreateIndex(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
Z
zhenshan.cao 已提交
469
		FullMethod: "/masterpb.Master/CreateIndex",
470 471 472 473 474 475 476
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MasterServer).CreateIndex(ctx, req.(*message.IndexParam))
	}
	return interceptor(ctx, in, info, handler)
}

Z
zhenshan.cao 已提交
477
var _Master_serviceDesc = grpc.ServiceDesc{
Z
zhenshan.cao 已提交
478
	ServiceName: "masterpb.Master",
Z
zhenshan.cao 已提交
479 480 481 482 483 484
	HandlerType: (*MasterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateCollection",
			Handler:    _Master_CreateCollection_Handler,
		},
485 486 487 488
		{
			MethodName: "CreateIndex",
			Handler:    _Master_CreateIndex_Handler,
		},
Z
zhenshan.cao 已提交
489 490
	},
	Streams:  []grpc.StreamDesc{},
Z
zhenshan.cao 已提交
491
	Metadata: "master.proto",
Z
zhenshan.cao 已提交
492
}