service

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNewPeer

func GenerateNewPeer() ([]byte, []byte, peer.ID, error)

Types

type Cid

type Cid struct {
	Root string `json:"/" mapstructure:"/"`
}

type CloserFunc

type CloserFunc func() error

func (CloserFunc) Close

func (c CloserFunc) Close() error

type ContentProviderService

type ContentProviderService struct {
	Resolver datasource.HandlerResolver
	DB       *gorm.DB
	// contains filtered or unexported fields
}

func NewContentProviderService

func NewContentProviderService(db *gorm.DB, bind string, identity string, listen []string) (*ContentProviderService, error)

func (*ContentProviderService) FindPieceAsPieceReader

func (s *ContentProviderService) FindPieceAsPieceReader(ctx context.Context, pieceCid cid.Cid) (
	*store.PieceReader,
	*model.Car,
	error,
)

func (*ContentProviderService) Start

func (s *ContentProviderService) Start()

func (*ContentProviderService) StartBitswap

func (s *ContentProviderService) StartBitswap() error

type DatasetListenerService

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

func NewDatasetListenerService

func NewDatasetListenerService(db *gorm.DB, stagingDir string, bind string) DatasetListenerService

func (DatasetListenerService) Start

func (s DatasetListenerService) Start()

type Deal

type Deal struct {
	Proposal DealProposal
	State    DealState
}

func (Deal) GetState

func (d Deal) GetState() model.DealState

func (Deal) Key

func (d Deal) Key() string

type DealMakerService

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

func NewDealMakerService

func NewDealMakerService(db *gorm.DB, lotusURL string, lotusToken string) (*DealMakerService, error)

func (DealMakerService) Run

func (d DealMakerService) Run(parent context.Context) error

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

func (*DealMakerWorker) Run

func (w *DealMakerWorker) Run(ctx context.Context, schedule model.Schedule)

type DealProposal

type DealProposal struct {
	PieceCID             Cid
	PieceSize            int64
	VerifiedDeal         bool
	Client               string
	Provider             string
	Label                string
	StartEpoch           int32
	EndEpoch             int32
	StoragePricePerEpoch string
}

type DealState

type DealState struct {
	SectorStartEpoch int32
	LastUpdatedEpoch int32
	SlashEpoch       int32
}

type DealTracker

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

func NewDealTracker

func NewDealTracker(db *gorm.DB, interval time.Duration,
	dealZstURL string,
	lotusURL string,
	lotusToken string) DealTracker

func (*DealTracker) Run

func (d *DealTracker) Run(ctx context.Context)

type ItemInfo

type ItemInfo struct {
	Type     model.SourceType `json:"type"`
	Path     string           `json:"path"`
	SourceID uint32           `json:"sourceId"`
}

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 (s SpadeAPI) GetEligiblePieces(c echo.Context) error

func (SpadeAPI) RequestPiece

func (s SpadeAPI) RequestPiece(c echo.Context) error

func (SpadeAPI) Start

func (s SpadeAPI) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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