minerclient

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodFilecoinStorageDeclareSector = "Filecoin.StorageDeclareSector"
	DefaultDeclareID                   = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeclareContent

type DeclareContent struct {
	Method    string        `json:"method"`
	DeclareID int           `json:"id"`
	Params    []interface{} `json:"params"`
}

DeclareContent example

'{
	"method": "Filecoin.StorageDeclareSector",
	"id": 0,
	"params": [
		"6b5bbb55-aaa2-4dec-8645-293b12c3d09c",
		{
			"Miner": 38310,
			"Number": 21
		},
		2,
		true
	]
}'

type MetaInfo

type MetaInfo struct {
	Miner  int `json:"Miner"`
	Number int `json:"Number"`
}

type MinerCli

type MinerCli struct {
	// contains filtered or unexported fields
}

func InitMinerCli

func InitMinerCli(conf config.Config) MinerCli

func (MinerCli) SectorDeclare

func (mc MinerCli) SectorDeclare(sectorID int, sft SectorFileType) error

type SectorFileType

type SectorFileType int
const (
	FTUnsealed SectorFileType = 1 << iota
	FTSealed
	FTCache
	FTUpdate
	FTUpdateCache

	FileTypes = iota
)

same as lotus source code. (https://github.com/filecoin-project/lotus/tree/master/storage/sealer/storiface/filetype.go#L11)

func (SectorFileType) String

func (t SectorFileType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL