Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Challenge ¶
type Challenge struct {
// contains filtered or unexported fields
}
Challenge implements the gRPC of ChallengeService, responsible for handling challenge piece request.
func NewChallengeService ¶
func NewChallengeService(cfg *ChallengeConfig) (*Challenge, error)
NewChallengeService returns an instance of Challenge that implementation of the lifecycle.Service and ChallengeService interface
func (*Challenge) ChallengePiece ¶
func (challenge *Challenge) ChallengePiece(ctx context.Context, req *types.ChallengePieceRequest) (*types.ChallengePieceResponse, error)
ChallengePiece handles the piece challenge request return the piece's integrity hash, piece hash and piece data
type ChallengeConfig ¶
type ChallengeConfig struct { GRPCAddress string SpDBConfig *config.SQLDBConfig PieceStoreConfig *storage.PieceStoreConfig }
ChallengeConfig defines challenge service config
Click to show internal directories.
Click to hide internal directories.