Documentation
¶
Index ¶
- Constants
- type ShuntMiner
- type Track
- func (n *Track) AddToTraceFile(fid string, t TrackerInfo) error
- func (n *Track) DeleteTraceFile(fid string)
- func (n *Track) GetNumbersTrackFiles(number int) ([]string, error)
- func (n *Track) HasTraceFile(fid string) bool
- func (n *Track) ListTraceFiles() ([]string, error)
- func (n *Track) ParsingTraceFile(fid string) (TrackerInfo, error)
- type Tracker
- type TrackerInfo
- type TrackerInfov1
Constants ¶
View Source
const MinTrackerInfoLength = 223
MinTrackerInfoLength = len(json.Marshal(TrackerInfo{}))
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShuntMiner ¶
type Track ¶
type Track struct {
// contains filtered or unexported fields
}
func (*Track) AddToTraceFile ¶
func (n *Track) AddToTraceFile(fid string, t TrackerInfo) error
func (*Track) DeleteTraceFile ¶
func (*Track) GetNumbersTrackFiles ¶ added in v0.4.2
func (*Track) HasTraceFile ¶
func (*Track) ListTraceFiles ¶
func (*Track) ParsingTraceFile ¶
func (n *Track) ParsingTraceFile(fid string) (TrackerInfo, error)
type Tracker ¶
type Tracker interface {
AddToTraceFile(fid string, t TrackerInfo) error
ParsingTraceFile(fid string) (TrackerInfo, error)
HasTraceFile(fid string) bool
ListTraceFiles() ([]string, error)
GetNumbersTrackFiles(number int) ([]string, error)
DeleteTraceFile(fid string)
}
func NewTracker ¶
type TrackerInfo ¶
type TrackerInfo struct {
Segment []chain.SegmentDataInfo `json:"segment"`
Owner []byte `json:"owner"`
ShuntMiner []string `json:"shunt_miner"`
Points coordinate.Range `json:"range"`
Fid string `json:"fid"`
FileName string `json:"file_name"`
BucketName string `json:"bucket_name"`
TerritoryName string `json:"territory_name"`
CacheDir string `json:"cache_dir"`
Cipher string `json:"cipher"`
FileSize uint64 `json:"file_size"`
}
type TrackerInfov1 ¶
type TrackerInfov1 struct {
Segment []chain.SegmentDataInfo `json:"segment"`
Owner []byte `json:"owner"`
ShuntMiner ShuntMiner `json:"shunt_miner"`
Points coordinate.Range `json:"range"`
Fid string `json:"fid"`
FileName string `json:"file_name"`
BucketName string `json:"bucket_name"`
TerritoryName string `json:"territory_name"`
CacheDir string `json:"cache_dir"`
Cipher string `json:"cipher"`
FileSize uint64 `json:"file_size"`
PutFlag bool `json:"put_flag"`
}
Click to show internal directories.
Click to hide internal directories.