mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
2ec573d2f9
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
40 lines
680 B
Go
40 lines
680 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
|
|
}
|
|
|
|
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 newPartition(partitionTag string) *Partition {
|
|
var newPartition = &Partition{
|
|
partitionTag: partitionTag,
|
|
}
|
|
|
|
return newPartition
|
|
}
|