Documentation ¶
Index ¶
- type Config
- type Service
- func (s *Service) Close() error
- func (s *Service) CreatePreparedStorageRequest(ctx context.Context, r *pb.CreatePreparedStorageRequestRequest) (*pb.CreatePreparedStorageRequestResponse, error)
- func (s *Service) CreateStorageRequest(ctx context.Context, r *pb.CreateStorageRequestRequest) (*pb.CreateStorageRequestResponse, error)
- func (s *Service) GetStorageRequestInfo(ctx context.Context, r *pb.GetStorageRequestInfoRequest) (*pb.GetStorageRequestInfoResponse, error)
- func (s *Service) OnAuctionClosed(ctx context.Context, opID msgbroker.OperationID, au broker.ClosedAuction) error
- func (s *Service) OnFinalizedDeal(ctx context.Context, opID msgbroker.OperationID, fd broker.FinalizedDeal) error
- func (s *Service) OnNewBatchCreated(ctx context.Context, id broker.BatchID, batchCid cid.Cid, batchSize int64, ...) error
- func (s *Service) OnNewBatchPrepared(ctx context.Context, id broker.BatchID, pr broker.DataPreparationResult) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ListenAddr string PostgresURI string IPFSAPIMultiaddr string DealDuration uint64 DealReplication uint32 DefaultWalletAddress string VerifiedDeals bool AuctionMaxRetries int DefaultBatchDeadlineDuration time.Duration DefaultProposalStartOffset time.Duration }
Config provides configuration to the broker service.
type Service ¶
type Service struct { pb.UnimplementedAPIServiceServer // contains filtered or unexported fields }
Service provides an implementation of the broker API.
func (*Service) CreatePreparedStorageRequest ¶
func (s *Service) CreatePreparedStorageRequest( ctx context.Context, r *pb.CreatePreparedStorageRequestRequest) (*pb.CreatePreparedStorageRequestResponse, error)
CreatePreparedStorageRequest creates a new prepared StorageRequest.
func (*Service) CreateStorageRequest ¶
func (s *Service) CreateStorageRequest( ctx context.Context, r *pb.CreateStorageRequestRequest) (*pb.CreateStorageRequestResponse, error)
CreateStorageRequest creates a new StorageRequest.
func (*Service) GetStorageRequestInfo ¶
func (s *Service) GetStorageRequestInfo( ctx context.Context, r *pb.GetStorageRequestInfoRequest) (*pb.GetStorageRequestInfoResponse, error)
GetStorageRequestInfo gets information about a storage request by id.
func (*Service) OnAuctionClosed ¶
func (s *Service) OnAuctionClosed(ctx context.Context, opID msgbroker.OperationID, au broker.ClosedAuction) error
OnAuctionClosed handles new messages in auction-closed topic.
func (*Service) OnFinalizedDeal ¶
func (s *Service) OnFinalizedDeal(ctx context.Context, opID msgbroker.OperationID, fd broker.FinalizedDeal) error
OnFinalizedDeal handles new messages in the finalized-deal topic.
func (*Service) OnNewBatchCreated ¶
func (s *Service) OnNewBatchCreated( ctx context.Context, id broker.BatchID, batchCid cid.Cid, batchSize int64, brids []broker.StorageRequestID, origin string, manifest []byte, carURL *url.URL) error
OnNewBatchCreated handles new messages in new-batch-created topic.
func (*Service) OnNewBatchPrepared ¶
func (s *Service) OnNewBatchPrepared( ctx context.Context, id broker.BatchID, pr broker.DataPreparationResult) error
OnNewBatchPrepared handles new messages in new-batch-prepared topic.
Click to show internal directories.
Click to hide internal directories.