Documentation ¶
Index ¶
Constants ¶
View Source
const (
SHELF_DIR = ".miner"
)
Variables ¶
This section is empty.
Functions ¶
func ObjectDir ¶
ObjectDir returns the directory path to store all object type of records - type 1: marks
- Record of each mine execution, in the format of TIMESTAMP PARENT MARK HASH ACCORDING MAP HASH 1 ACCORDING MAP HASH 2 ...
- type 2: maps
- A list of stuff records, each module will have it own stuff record, in the format of ACCORDING STUFF HASH 1 <SPACE> STUFF IDENTIFIER ACCORDING STUFF HASH 2 <SPACE> STUFF IDENTIFIER ...
- type 3: stuff
- Record of fetched stuff information, in json format of struct shared.MinerResource
func ObjectFile ¶
ObjectFile returns the file path to store the object record with the given file name
Types ¶
type IdentifierHashMap ¶
type IdentifierHashMaps ¶
type IdentifierHashMaps struct { Hash string // Module string Group string Maps []IdentifierHashMap // contains filtered or unexported fields }
func (*IdentifierHashMaps) Sort ¶
func (ihm *IdentifierHashMaps) Sort()
Sort sorts the IdentifierHashMaps by the hash field.
func (*IdentifierHashMaps) Write ¶
func (lhm *IdentifierHashMaps) Write() error
type LabelMark ¶
type LabelMark struct { // Module string Hash string TimeStamp time.Time Parent string Mappings []MarkMapping Group string // contains filtered or unexported fields }
func NewMark ¶
NewMark creates a new label mark with the given plugin name, plugin id and label map hash.
func (*LabelMark) AddMapping ¶
AddMapping adds a new mark mapping to the label mark.
type MarkMapping ¶
Click to show internal directories.
Click to hide internal directories.