milvus/internal/datanode/collection.go
bigsheeper 7554246ace Add segment seeking and use real client
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2021-01-25 18:33:10 +08:00

31 lines
566 B
Go

package datanode
import (
"github.com/zilliztech/milvus-distributed/internal/proto/schemapb"
)
type Collection struct {
schema *schemapb.CollectionSchema
id UniqueID
}
func (c *Collection) Name() string {
return c.schema.Name
}
func (c *Collection) ID() UniqueID {
return c.id
}
func (c *Collection) Schema() *schemapb.CollectionSchema {
return c.schema
}
func newCollection(collectionID UniqueID, schema *schemapb.CollectionSchema) *Collection {
var newCollection = &Collection{
schema: schema,
id: collectionID,
}
return newCollection
}