2020-08-28 09:29:26 +00:00
|
|
|
package reader
|
|
|
|
|
2020-09-02 02:38:08 +00:00
|
|
|
/*
|
|
|
|
|
2020-10-23 10:01:24 +00:00
|
|
|
#cgo CFLAGS: -I${SRCDIR}/../core/output/include
|
2020-09-02 02:38:08 +00:00
|
|
|
|
2020-10-31 07:11:47 +00:00
|
|
|
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_segcore -Wl,-rpath=${SRCDIR}/../core/output/lib
|
2020-09-02 02:38:08 +00:00
|
|
|
|
|
|
|
#include "collection_c.h"
|
|
|
|
#include "segment_c.h"
|
|
|
|
|
|
|
|
*/
|
2020-08-28 09:29:26 +00:00
|
|
|
import "C"
|
|
|
|
|
|
|
|
type Partition struct {
|
2020-11-09 08:27:11 +00:00
|
|
|
partitionTag string
|
|
|
|
segments []*Segment
|
2020-08-28 09:29:26 +00:00
|
|
|
}
|
|
|
|
|
2020-11-09 08:27:11 +00:00
|
|
|
func (p *Partition) Tag() string {
|
|
|
|
return (*p).partitionTag
|
|
|
|
}
|
2020-08-28 09:29:26 +00:00
|
|
|
|
2020-11-09 08:27:11 +00:00
|
|
|
func (p *Partition) Segments() *[]*Segment {
|
|
|
|
return &(*p).segments
|
2020-08-28 09:29:26 +00:00
|
|
|
}
|
|
|
|
|
2020-11-09 08:27:11 +00:00
|
|
|
func newPartition(partitionTag string) *Partition {
|
|
|
|
var newPartition = &Partition{
|
|
|
|
partitionTag: partitionTag,
|
2020-10-24 02:45:57 +00:00
|
|
|
}
|
|
|
|
|
2020-11-09 08:27:11 +00:00
|
|
|
return newPartition
|
2020-08-28 09:29:26 +00:00
|
|
|
}
|