Documentation ¶
Index ¶
- Constants
- func ConfigureModels(db *gorm.DB)
- func GetHostname() string
- func GetPublicIP() (string, error)
- func OpenDatabase(cfg config.DeltaConfig) (*gorm.DB, error)
- func ScanHostComputeResources(ln *LightNode, repo string) error
- type CarHeader
- type CarParam
- type CommpResult
- type Content
- type ContentCarSplit
- type ContentDeal
- type ContentReplication
- type FileSplitter
- type GatewayHandler
- type Input
- type LightNode
- type LocalWallet
- type PieceCommitment
- type Result
- type SplitChunk
- type SplitReassembler
- type SplitReassemblerParam
- type SplitterParam
- type UploadSplits
Constants ¶
View Source
const BufSize = (4 << 20) / 128 * 127
Variables ¶
This section is empty.
Functions ¶
func ConfigureModels ¶
func GetHostname ¶
func GetHostname() string
func GetPublicIP ¶
func OpenDatabase ¶
func OpenDatabase(cfg config.DeltaConfig) (*gorm.DB, error)
Types ¶
type CommpResult ¶ added in v1.0.2
type CommpResult struct {
// contains filtered or unexported fields
}
type Content ¶
type Content struct { ID int64 `gorm:"primaryKey"` Name string `json:"name"` Size int64 `json:"size"` Cid string `json:"cid"` RequestingApiKey string `json:"requesting_api_key,omitempty"` DeltaContentId int64 `json:"delta_content_id"` DeltaNodeUrl string `json:"delta_node_url"` Status string `json:"status"` LastMessage string `json:"last_message"` Miner string `json:"miner"` Replication int `json:"replication"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
main content record
type ContentCarSplit ¶
type ContentDeal ¶
type ContentDeal struct { ID int64 `gorm:"primaryKey"` CreatedAt time.Time `json:"CreatedAt"` UpdatedAt time.Time `json:"UpdatedAt"` DeletedAt time.Time `json:"DeletedAt"` ContentId int64 `json:"delta_content_id"` UserID int `json:"user_id"` PropCid string `json:"propCid"` DealUUID string `json:"dealUuid"` Miner string `json:"miner"` Status string `json:"status"` Failed bool `json:"failed"` Verified bool `json:"verified"` Slashed bool `json:"slashed"` FailedAt time.Time `json:"failedAt"` DtChan string `json:"dtChan"` TransferStarted time.Time `json:"transferStarted"` TransferFinished time.Time `json:"transferFinished"` OnChainAt time.Time `json:"onChainAt"` SealedAt time.Time `json:"sealedAt"` DealProtocolVersion string `json:"deal_protocol_version"` MinerVersion string `json:"miner_version"` }
type ContentReplication ¶
type ContentReplication struct { ID int64 `gorm:"primaryKey"` PrimaryContentID int64 `json:"primary_content_id"` PrimaryDeltaContentID int64 `json:"primary_delta_content_id"` ReplicaContentID int64 `json:"replica_content_id"` ReplicaDeltaContentID int64 `json:"replica_delta_content_id"` CreatedAt time.Time `json:"CreatedAt"` UpdatedAt time.Time `json:"UpdatedAt"` }
type FileSplitter ¶
type FileSplitter struct {
SplitterParam
}
func NewFileSplitter ¶
func NewFileSplitter(param SplitterParam) FileSplitter
func (FileSplitter) SplitFileFromReader ¶
func (c FileSplitter) SplitFileFromReader(fileFromReader io.Reader) ([][]byte, error)
func (FileSplitter) SplitFileFromReaderIntoBlockstore ¶
func (c FileSplitter) SplitFileFromReaderIntoBlockstore(fileFromReader io.Reader) ([]SplitChunk, error)
type GatewayHandler ¶
type GatewayHandler struct {
// contains filtered or unexported fields
}
func NewGatewayHandler ¶
func NewGatewayHandler(node *whypfs.Node) (*GatewayHandler, error)
type LightNode ¶
type LightNode struct { Node *whypfs.Node Api url.URL DB *gorm.DB Gw *GatewayHandler Config *config.DeltaConfig }
func NewEdgeNode ¶
NewEdgeNode Add a config to enable gateway or not. Add a config to enable content, bucket, commp, replication verifier processor
func (*LightNode) ConnectToDelegates ¶
func (*LightNode) GetLocalhostOrigins ¶
type LocalWallet ¶
type LocalWallet struct {
// contains filtered or unexported fields
}
type PieceCommitment ¶ added in v1.0.2
type Result ¶ added in v1.0.2
type Result struct { PayloadCid string `json:"cid"` PieceCommitment PieceCommitment `json:"piece_commitment"` Size uint64 `json:"size"` Miner string `json:"miner"` CidMap map[string]utils.CidMapValue `json:"cid_map"` }
func ChunkFileToCar ¶ added in v1.0.2
type SplitChunk ¶
type SplitReassembler ¶
type SplitReassembler struct {
SplitReassemblerParam
}
func NewSplitReassembler ¶
func NewSplitReassembler(param SplitReassemblerParam) SplitReassembler
func (SplitReassembler) ReassembleFileFromCid ¶
func (c SplitReassembler) ReassembleFileFromCid(cidStr string) (*os.File, error)
cid of the splitupload file
type SplitReassemblerParam ¶
type SplitReassemblerParam struct {
LightNode *LightNode
}
type SplitterParam ¶
type UploadSplits ¶
Click to show internal directories.
Click to hide internal directories.