Documentation ¶
Index ¶
- Constants
- func CreateBlockset(b agro.BlockLayer, store agro.BlockStore, subLayer blockset) (agro.Blockset, error)
- func CreateBlocksetFromSpec(spec agro.BlockLayerSpec, store agro.BlockStore) (agro.Blockset, error)
- func MustParseBlockLayerSpec(s string) agro.BlockLayerSpec
- func ParseBlockLayerKind(s string) (agro.BlockLayerKind, error)
- func ParseBlockLayerSpec(s string) (agro.BlockLayerSpec, error)
- func RegisterBlockset(b agro.BlockLayerKind, newFunc CreateBlocksetFunc)
- func UnmarshalFromProto(layers []*models.BlockLayer, store agro.BlockStore) (agro.Blockset, error)
- type CreateBlocksetFunc
Constants ¶
View Source
const ( Base agro.BlockLayerKind = iota CRC Replication )
Constants for each type of layer, for serializing/deserializing
Variables ¶
This section is empty.
Functions ¶
func CreateBlockset ¶
func CreateBlockset(b agro.BlockLayer, store agro.BlockStore, subLayer blockset) (agro.Blockset, error)
CreateBlockset creates a Blockset of type b, with serialized data, backing store, and subLayer, if any) with the provided address.
func CreateBlocksetFromSpec ¶
func CreateBlocksetFromSpec(spec agro.BlockLayerSpec, store agro.BlockStore) (agro.Blockset, error)
func MustParseBlockLayerSpec ¶
func MustParseBlockLayerSpec(s string) agro.BlockLayerSpec
func ParseBlockLayerKind ¶
func ParseBlockLayerKind(s string) (agro.BlockLayerKind, error)
func ParseBlockLayerSpec ¶
func ParseBlockLayerSpec(s string) (agro.BlockLayerSpec, error)
func RegisterBlockset ¶
func RegisterBlockset(b agro.BlockLayerKind, newFunc CreateBlocksetFunc)
RegisterBlockset is the hook used for implementions of blocksets to register themselves to the system. This is usually called in the init() of the package that implements the blockset.
func UnmarshalFromProto ¶
func UnmarshalFromProto(layers []*models.BlockLayer, store agro.BlockStore) (agro.Blockset, error)
Types ¶
type CreateBlocksetFunc ¶
type CreateBlocksetFunc func(opts string, store agro.BlockStore, subLayer blockset) (blockset, error)
CreateBlocksetFunc is the signature of a constructor used to create a BlockLayer.
Click to show internal directories.
Click to hide internal directories.