github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/entity/segment.go (about) 1 // Copyright (C) 2019-2021 Zilliz. All rights reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 4 // with the License. You may obtain a copy of the License at 5 // 6 // http://www.apache.org/licenses/LICENSE-2.0 7 // 8 // Unless required by applicable law or agreed to in writing, software distributed under the License 9 // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 10 // or implied. See the License for the specific language governing permissions and limitations under the License. 11 12 package entity 13 14 import ( 15 common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" 16 ) 17 18 // Segment represent segment in milvus 19 type Segment struct { 20 ID int64 21 CollectionID int64 22 ParititionID int64 23 IndexID int64 24 25 NumRows int64 26 State common.SegmentState 27 } 28 29 // Flushed indicates segment is flushed 30 func (s Segment) Flushed() bool { 31 return s.State == common.SegmentState_Flushed 32 }