Documentation ¶
Index ¶
- Variables
- func NewHeaderVersionHandler(versionsByEpochs []config.VersionByEpochs, defaultVersion string, ...) (*headerVersionHandler, error)
- func NewMetaHeaderFactory(headerVersionHandler HeaderVersionGetter) (*metaHeaderVersionHandler, error)
- func NewShardHeaderFactory(headerVersionHandler HeaderVersionGetter) (*shardHeaderFactory, error)
- type HeaderVersionGetter
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyVersionsByEpochsList = errors.New("empty versions by epochs list")
ErrEmptyVersionsByEpochsList signals that an empty versions by epochs list was provided
var ErrInvalidSoftwareVersion = errors.New("invalid software version")
ErrInvalidSoftwareVersion signals that an invalid software version was provided
var ErrInvalidVersionOnEpochValues = errors.New("invalid version provided on epoch values")
ErrInvalidVersionOnEpochValues signals that the version element is not accepted because the epoch values are invalid
var ErrInvalidVersionStringTooLong = errors.New("invalid version provided: string too large")
ErrInvalidVersionStringTooLong signals that the version element is not accepted because it contains too large strings
var ErrNilCacher = errors.New("nil cacher")
ErrNilCacher signals that a nil cacher has been provided
var ErrNilHeaderVersionHandler = errors.New("nil error version handler")
ErrNilHeaderVersionHandler signals that a nil header version handler was provided
var ErrSoftwareVersionMismatch = errors.New("software versions mismatch")
ErrSoftwareVersionMismatch signals a software version mismatch
Functions ¶
func NewHeaderVersionHandler ¶
func NewHeaderVersionHandler( versionsByEpochs []config.VersionByEpochs, defaultVersion string, versionCache storage.Cacher, ) (*headerVersionHandler, error)
NewHeaderVersionHandler returns a new instance of a structure capable of handling the header versions
func NewMetaHeaderFactory ¶
func NewMetaHeaderFactory(headerVersionHandler HeaderVersionGetter) (*metaHeaderVersionHandler, error)
NewMetaHeaderFactory creates a meta header factory instance
func NewShardHeaderFactory ¶
func NewShardHeaderFactory(headerVersionHandler HeaderVersionGetter) (*shardHeaderFactory, error)
NewShardHeaderFactory creates a shard header factory instance
Types ¶
type HeaderVersionGetter ¶
HeaderVersionGetter can get the header version based on epoch