[skip e2e] Add comment for IndexCodec (#14139)

Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
pull/14164/head
shaoyue 2021-12-24 13:31:30 +08:00 committed by GitHub
parent 94265639fe
commit e0a2f1ce82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1235,6 +1235,7 @@ func NewIndexCodec() *IndexCodec {
return &IndexCodec{}
}
// Serialize serializes index
func (indexCodec *IndexCodec) Serialize(blobs []*Blob, params map[string]string, indexName string, indexID UniqueID) ([]*Blob, error) {
paramsBytes, err := json.Marshal(struct {
Params map[string]string
@ -1252,6 +1253,7 @@ func (indexCodec *IndexCodec) Serialize(blobs []*Blob, params map[string]string,
return blobs, nil
}
// Deserialize deserializes index
func (indexCodec *IndexCodec) Deserialize(blobs []*Blob) ([]*Blob, map[string]string, string, UniqueID, error) {
var file *Blob
for i := 0; i < len(blobs); i++ {