forked from TrueCloudLab/frostfs-node
[#1320] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
This commit is contained in:
parent
d99800ee93
commit
cc7a723d77
182 changed files with 802 additions and 802 deletions
|
@ -8,18 +8,18 @@ import (
|
|||
// basic network map receiving method.
|
||||
type Source interface {
|
||||
// GetNetMap reads the diff-th past network map from the storage.
|
||||
// Calling with zero diff returns latest network map.
|
||||
// It returns the pointer to requested network map and any error encountered.
|
||||
// Calling with zero diff returns the latest network map.
|
||||
// It returns the pointer to the requested network map and any error encountered.
|
||||
//
|
||||
// GetNetMap must return exactly one non-nil value.
|
||||
// GetNetMap must return ErrNotFound if the network map is not in storage.
|
||||
// GetNetMap must return ErrNotFound if the network map is not in the storage.
|
||||
//
|
||||
// Implementations must not retain the network map pointer and modify
|
||||
// the network map through it.
|
||||
GetNetMap(diff uint64) (*netmap.Netmap, error)
|
||||
|
||||
// GetNetMapByEpoch reads network map by the epoch number from the storage.
|
||||
// It returns the pointer to requested network map and any error encountered.
|
||||
// It returns the pointer to the requested network map and any error encountered.
|
||||
//
|
||||
// Must return exactly one non-nil value.
|
||||
//
|
||||
|
@ -27,19 +27,19 @@ type Source interface {
|
|||
// the network map through it.
|
||||
GetNetMapByEpoch(epoch uint64) (*netmap.Netmap, error)
|
||||
|
||||
// Epoch reads current epoch from the storage.
|
||||
// It returns number of the current epoch and any error encountered.
|
||||
// Epoch reads the current epoch from the storage.
|
||||
// It returns thw number of the current epoch and any error encountered.
|
||||
//
|
||||
// Must return exactly one non-default value.
|
||||
Epoch() (uint64, error)
|
||||
}
|
||||
|
||||
// GetLatestNetworkMap requests and returns latest network map from storage.
|
||||
// GetLatestNetworkMap requests and returns the latest network map from the storage.
|
||||
func GetLatestNetworkMap(src Source) (*netmap.Netmap, error) {
|
||||
return src.GetNetMap(0)
|
||||
}
|
||||
|
||||
// GetPreviousNetworkMap requests and returns previous from latest network map from storage.
|
||||
// GetPreviousNetworkMap requests and returns previous from the latest network map from the storage.
|
||||
func GetPreviousNetworkMap(src Source) (*netmap.Netmap, error) {
|
||||
return src.GetNetMap(1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue