Documentation ¶
Index ¶
- func BootstrapEstuaryPeers() []peer.AddrInfo
- func ConfigureModels(db *gorm.DB)
- func GetHostname() string
- func GetPublicIP() (string, error)
- func OpenDatabase() (*gorm.DB, error)
- func ScanHostComputeResources(ln *LightNode, repo string) error
- type Configuration
- type Content
- type ContentCarSplit
- type ContentDeal
- type ContentReplication
- type FileSplitter
- type GatewayHandler
- type LightNode
- type LocalWallet
- type SplitChunk
- type SplitReassembler
- type SplitReassemblerParam
- type SplitterParam
- type UploadSplits
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapEstuaryPeers ¶
Creating a list of multiaddresses that are used to bootstrap the network.
func ConfigureModels ¶
func GetHostname ¶
func GetHostname() string
func GetPublicIP ¶
func OpenDatabase ¶
Types ¶
type Configuration ¶
type Configuration struct {
APINodeAddress string
}
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"` 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 *Configuration }
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 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.