mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 20:39:36 +08:00
f940cc455a
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
51 lines
880 B
Go
51 lines
880 B
Go
package querynode
|
|
|
|
/*
|
|
|
|
#cgo CFLAGS: -I${SRCDIR}/../core/output/include
|
|
|
|
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_segcore -Wl,-rpath=${SRCDIR}/../core/output/lib
|
|
|
|
#include "segcore/collection_c.h"
|
|
#include "segcore/segment_c.h"
|
|
|
|
*/
|
|
import "C"
|
|
|
|
type Partition struct {
|
|
partitionTag string
|
|
id UniqueID
|
|
segments []*Segment
|
|
enableDM bool
|
|
}
|
|
|
|
func (p *Partition) ID() UniqueID {
|
|
return p.id
|
|
}
|
|
|
|
func (p *Partition) Tag() string {
|
|
return (*p).partitionTag
|
|
}
|
|
|
|
func (p *Partition) Segments() *[]*Segment {
|
|
return &(*p).segments
|
|
}
|
|
|
|
func newPartition2(partitionTag string) *Partition {
|
|
var newPartition = &Partition{
|
|
partitionTag: partitionTag,
|
|
enableDM: false,
|
|
}
|
|
|
|
return newPartition
|
|
}
|
|
|
|
func newPartition(partitionID UniqueID) *Partition {
|
|
var newPartition = &Partition{
|
|
id: partitionID,
|
|
enableDM: false,
|
|
}
|
|
|
|
return newPartition
|
|
}
|