Documentation
¶
Index ¶
- func GenerateNewPeer() ([]byte, []byte, peer.ID, error)
- func GetMetadataHandler(c echo.Context, db *gorm.DB) error
- type Cid
- type CloserFunc
- type ContentProviderConfig
- type ContentProviderService
- func (s *ContentProviderService) FindPiece(ctx context.Context, pieceCid cid.Cid) (io.ReadSeekCloser, time.Time, error)
- func (s *ContentProviderService) GetMetadataHandler(c echo.Context) error
- func (s *ContentProviderService) GetPieceMetadata(ctx context.Context, car model.Car) (*PieceMetadata, error)
- func (s *ContentProviderService) Start(ctx context.Context)
- func (s *ContentProviderService) StartBitswap(ctx context.Context) error
- type Deal
- type DealMakerService
- type DealMakerWorker
- type DealProposal
- type DealState
- type DealTracker
- type PieceMetadata
- type SpadeAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetadataHandler ¶ added in v0.2.17
Types ¶
type CloserFunc ¶
type CloserFunc func() error
func (CloserFunc) Close ¶
func (c CloserFunc) Close() error
type ContentProviderConfig ¶ added in v0.2.10
type ContentProviderService ¶
type ContentProviderService struct {
Resolver datasource.HandlerResolver
DB *gorm.DB
// contains filtered or unexported fields
}
func NewContentProviderService ¶
func NewContentProviderService(db *gorm.DB, config ContentProviderConfig) (*ContentProviderService, error)
func (*ContentProviderService) FindPiece ¶ added in v0.2.10
func (s *ContentProviderService) FindPiece(ctx context.Context, pieceCid cid.Cid) ( io.ReadSeekCloser, time.Time, error, )
func (*ContentProviderService) GetMetadataHandler ¶ added in v0.2.14
func (s *ContentProviderService) GetMetadataHandler(c echo.Context) error
func (*ContentProviderService) GetPieceMetadata ¶ added in v0.2.14
func (s *ContentProviderService) GetPieceMetadata(ctx context.Context, car model.Car) (*PieceMetadata, error)
func (*ContentProviderService) Start ¶
func (s *ContentProviderService) Start(ctx context.Context)
func (*ContentProviderService) StartBitswap ¶
func (s *ContentProviderService) StartBitswap(ctx context.Context) error
type Deal ¶
type Deal struct {
Proposal DealProposal
State DealState
}
type DealMakerService ¶
type DealMakerService struct {
// contains filtered or unexported fields
}
func NewDealMakerService ¶
type DealMakerWorker ¶
type DealMakerWorker struct {
// contains filtered or unexported fields
}
func NewDealMakerWorker ¶
func NewDealMakerWorker(db *gorm.DB, dealMaker *replication.DealMaker, walletChooser *replication.WalletChooser, workerID uuid.UUID) *DealMakerWorker
type DealProposal ¶
type DealTracker ¶
type DealTracker struct {
// contains filtered or unexported fields
}
func NewDealTracker ¶
func (*DealTracker) Run ¶
func (d *DealTracker) Run(ctx context.Context)
type PieceMetadata ¶ added in v0.2.14
type PieceMetadata struct {
Car model.Car `json:"car"`
Source model.Source `json:"source"`
CarBlocks []model.CarBlock `json:"carBlocks"`
Items []model.Item `json:"items"`
}
func GetPieceMetadata ¶ added in v0.2.17
type SpadeAPI ¶
type SpadeAPI struct {
// contains filtered or unexported fields
}
func NewSpadeAPIService ¶
func NewSpadeAPIService(db *gorm.DB, dealMaker *replication.DealMaker, walletChooser *replication.WalletChooser, bind string) *SpadeAPI
func (SpadeAPI) GetEligiblePieces ¶
func (SpadeAPI) RequestPiece ¶
Click to show internal directories.
Click to hide internal directories.