MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / ReadMaxVersion

Method ReadMaxVersion

internal/iplibrary/ip_list_kv.go:188–201  ·  view source on GitHub ↗

ReadMaxVersion 读取当前最大版本号

()

Source from the content-addressed store, hash-verified

186
187// ReadMaxVersion 读取当前最大版本号
188func (this *KVIPList) ReadMaxVersion() (int64, error) {
189 if this.isClosed {
190 return 0, errors.New("database has been closed")
191 }
192
193 version, err := this.versionsTable.Get("version")
194 if err != nil {
195 if kvstore.IsNotFound(err) {
196 return 0, nil
197 }
198 return 0, err
199 }
200 return version, nil
201}
202
203// UpdateMaxVersion 修改版本号
204func (this *KVIPList) UpdateMaxVersion(version int64) error {

Callers 2

Calls 2

IsNotFoundFunction · 0.92
GetMethod · 0.45

Tested by 2