guard

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GuardTimeout = 360 * time.Second
)

Variables

This section is empty.

Functions

func PrepCustomFileChallengeQuestions

func PrepCustomFileChallengeQuestions(rss *sessions.RenterSession, fileHash cidlib.Cid, shardHashes []cidlib.Cid, hostIDs []string,
	questionsPerShard int, offlineSigning bool, renterPid string) ([]*guardpb.ShardChallengeQuestions, error)

PrepCustomFileChallengeQuestions is the inner version of PrepFileChallengeQuestions without using a real guard file contracts, but rather custom parameters (mostly for manual testing)

func PrepFileChallengeQuestions

func PrepFileChallengeQuestions(rss *sessions.RenterSession, fsStatus *guardpb.FileStoreStatus,
	fileHash string, offlineSigning bool, renterPid string) (
	[]*guardpb.ShardChallengeQuestions, error)

PrepFileChallengeQuestions checks and prepares all shard questions in one setting

func PrepShardChallengeQuestions

func PrepShardChallengeQuestions(rss *sessions.RenterSession, fileHash cidlib.Cid, shardHash cidlib.Cid,
	hostID string, numQuestions int, renterPid string) (*guardpb.ShardChallengeQuestions, error)

PrepShardChallengeQuestions checks and prepares an amount of random challenge questions and returns the necessary guard proto struct

func SendChallengeQuestions

func SendChallengeQuestions(ctx context.Context, cfg *config.Config, fileHash cidlib.Cid,
	questions []*guardpb.ShardChallengeQuestions) error

SendChallengeQuestions combines all shard questions in a file and sends to guard service

Types

This section is empty.

Jump to

Keyboard shortcuts

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