Documentation
¶
Index ¶
- Constants
- func DownloadFragmentFromGW(url, fpath, account, message, signature string) error
- func GetLocalIP() (string, error)
- func InitMiddlewares() []gin.HandlerFunc
- func NewPoisProver(expendersInfo chain.ExpendersInfo, freeSpace, count int64, ...) (*pois.Prover, error)
- func ProcessTeeEndpoint(endPoint string) string
- func SplitByN(filePath string, N int64) (Data [][]byte, sep int64, err error)
- func WatchMem()
- type DataDir
- type GenProofResponse
- type HashSelf
- type Node
- func (n *Node) CalcTag(ch chan<- bool)
- func (n *Node) CertIdle(ch chan<- bool)
- func (n *Node) ChallengeMgt(idleChallTaskCh chan bool, serviceChallTaskCh chan bool)
- func (n *Node) CheckPois(cpus int)
- func (n *Node) DownloadFragment(fid, fragment_hash, savepath string) error
- func (n *Node) GenIdle(ch chan<- bool)
- func (n *Node) InitAccRsaKey(key *acc.RsaKey)
- func (n *Node) InitCache()
- func (n *Node) InitCacher(cace cache.Cache)
- func (n *Node) InitChainClient()
- func (n *Node) InitChainclient(cli chain.Chainer)
- func (n *Node) InitLogger(lg logger.Logger)
- func (n *Node) InitLogs()
- func (n *Node) InitMinerPoisInfo(poisInfo *pb.MinerPoisInfo)
- func (n *Node) InitNode() *Node
- func (n *Node) InitPoisProver(p *pois.Prover)
- func (n *Node) InitRSAKeyPair(key *RSAKeyPair)
- func (n *Node) InitRunStatus(st types.Bytes, apiEndpoint string, t string, register bool)
- func (n *Node) InitRunstatus(rt runstatus.Runstatus)
- func (n *Node) InitTeeRecord(tees record.TeeRecorder)
- func (n *Node) InitWebServer(mdls []gin.HandlerFunc, hdl *web.Handler)
- func (n *Node) InitWorkspace(ws string)
- func (n *Node) Reconnectrpc()
- func (n *Node) ReplaceIdle(ch chan<- bool)
- func (n *Node) ReportFiles(ch chan<- bool)
- func (n *Node) RestoreFiles(ch chan bool)
- func (n *Node) RestoreLocalFiles() error
- func (n *Node) RestoreOtherFiles() error
- func (n *Node) Start()
- func (n *Node) SyncTeeInfo(ch chan<- bool)
- type QElement
- type RSAKeyPair
- func (keyPair RSAKeyPair) AggrAppendProof(AggrSigma string, aSigma string) (string, bool)
- func (keyPair RSAKeyPair) AggrGenProof(QSlice []QElement, Tag []Tag) string
- func (keyPair RSAKeyPair) GenProof(QSlice []QElement, h HashSelf, Phi []string, Matrix [][]byte) <-chan GenProofResponse
- func (r *RSAKeyPair) VerifyAttest(name, u, phiHash, attest, customData string) (bool, error)
- type StatueMsg
- type T
- type Tag
- type TagfileType
Constants ¶
View Source
const ( Active = iota Calculate Missing Recovery )
View Source
const ( // Record the fid of stored files Cach_prefix_File = "file:" // Record the block of reported tags Cach_prefix_Tag = "tag:" Cach_prefix_MyLost = "mylost:" Cach_prefix_recovery = "recovery:" Cach_prefix_TargetMiner = "targetminer:" Cach_prefix_ParseBlock = "parseblocks" )
View Source
const ( Unregistered = iota UnregisteredPoisKey Registered )
View Source
const ( Success = 200 Error = 201 ErrorParam = 202 ErrorParamNotFound = 203 ErrorInternal = 204 )
Variables ¶
This section is empty.
Functions ¶
func DownloadFragmentFromGW ¶ added in v0.8.2
func GetLocalIP ¶ added in v0.8.1
func InitMiddlewares ¶ added in v0.8.1
func InitMiddlewares() []gin.HandlerFunc
func NewPoisProver ¶ added in v0.8.1
func ProcessTeeEndpoint ¶
Types ¶
type GenProofResponse ¶
type Node ¶
type Node struct { confile.Confiler logger.Logger cache.Cache record.TeeRecorder runstatus.Runstatus workspace.Workspace chain.Chainer *pb.MinerPoisInfo *RSAKeyPair *pois.Prover *acc.RsaKey *gin.Engine chain.ExpendersInfo }
func NewEmptyNode ¶ added in v0.8.1
func NewEmptyNode() *Node
func NewNodeWithConfig ¶ added in v0.8.1
func (*Node) ChallengeMgt ¶ added in v0.8.1
func (*Node) DownloadFragment ¶ added in v0.8.2
func (*Node) InitAccRsaKey ¶ added in v0.8.1
func (*Node) InitCacher ¶ added in v0.8.1
func (*Node) InitChainClient ¶ added in v0.8.1
func (n *Node) InitChainClient()
func (*Node) InitChainclient ¶ added in v0.8.1
func (*Node) InitLogger ¶ added in v0.8.1
func (*Node) InitMinerPoisInfo ¶ added in v0.8.1
func (n *Node) InitMinerPoisInfo(poisInfo *pb.MinerPoisInfo)
func (*Node) InitPoisProver ¶ added in v0.8.1
func (*Node) InitRSAKeyPair ¶ added in v0.8.1
func (n *Node) InitRSAKeyPair(key *RSAKeyPair)
func (*Node) InitRunStatus ¶ added in v0.8.1
func (*Node) InitRunstatus ¶ added in v0.8.1
func (*Node) InitTeeRecord ¶ added in v0.8.1
func (n *Node) InitTeeRecord(tees record.TeeRecorder)
func (*Node) InitWebServer ¶ added in v0.8.1
func (n *Node) InitWebServer(mdls []gin.HandlerFunc, hdl *web.Handler)
func (*Node) InitWorkspace ¶ added in v0.8.1
func (*Node) Reconnectrpc ¶ added in v0.8.1
func (n *Node) Reconnectrpc()
func (*Node) ReplaceIdle ¶ added in v0.8.1
func (*Node) ReportFiles ¶ added in v0.8.1
func (*Node) RestoreFiles ¶ added in v0.8.1
func (*Node) RestoreLocalFiles ¶ added in v0.8.1
func (*Node) RestoreOtherFiles ¶ added in v0.8.1
func (*Node) SyncTeeInfo ¶ added in v0.8.1
type RSAKeyPair ¶
func NewRsaKey ¶
func NewRsaKey(pubkey []byte) (*RSAKeyPair, error)
func (RSAKeyPair) AggrAppendProof ¶
func (keyPair RSAKeyPair) AggrAppendProof(AggrSigma string, aSigma string) (string, bool)
func (RSAKeyPair) AggrGenProof ¶
func (keyPair RSAKeyPair) AggrGenProof(QSlice []QElement, Tag []Tag) string
func (RSAKeyPair) GenProof ¶
func (keyPair RSAKeyPair) GenProof(QSlice []QElement, h HashSelf, Phi []string, Matrix [][]byte) <-chan GenProofResponse
func (*RSAKeyPair) VerifyAttest ¶
func (r *RSAKeyPair) VerifyAttest(name, u, phiHash, attest, customData string) (bool, error)
type TagfileType ¶
type TagfileType struct { Tag *pb.Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` USig []byte `protobuf:"bytes,2,opt,name=u_sig,json=uSig,proto3" json:"u_sig,omitempty"` Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` FragmentName []byte `protobuf:"bytes,4,opt,name=fragment_name,json=fragmentName,proto3" json:"fragment_name,omitempty"` TeeAccountId []byte `protobuf:"bytes,5,opt,name=tee_account_id,json=teeAccountId,proto3" json:"tee_account_id,omitempty"` Index uint16 `protobuf:"bytes,6,opt,name=index,json=index,proto3" json:"index,omitempty"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.