Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrVerification = serrors.New("all segments failed to verify") ErrDB = serrors.New("database error") )
Errors
Functions ¶
This section is empty.
Types ¶
type DefaultStorage ¶
DefaultStorage wraps path DB and revocation cache and offers convenience methods that implement the Storage interface.
func (*DefaultStorage) StoreRevs ¶
func (s *DefaultStorage) StoreRevs(ctx context.Context, revs []*path_mgmt.SignedRevInfo) error
StoreRevs stores the given revocations in the revocation cache.
type DefaultVerifier ¶
DefaultVerifier is a convenience wrapper around segverifier that implements the Verifier interface.
func (*DefaultVerifier) Verify ¶
func (v *DefaultVerifier) Verify(ctx context.Context, recs Segments, server net.Addr) (chan segverifier.UnitResult, int)
Verify calls segverifier for the given reply.
type Handler ¶
Handler is a handler that verifies and stores seg replies. The handler supports an early trigger, so that a partial result can be stored early to possibly reply to clients earlier.
type ProcessedResult ¶
type ProcessedResult struct {
// contains filtered or unexported fields
}
ProcessedResult is the result of handling a segment reply.
func (*ProcessedResult) EarlyTriggerProcessed ¶
func (r *ProcessedResult) EarlyTriggerProcessed() <-chan int
EarlyTriggerProcessed returns a channel that will contain the number of successfully stored segments once it is done processing the early trigger.
func (*ProcessedResult) Err ¶
func (r *ProcessedResult) Err() error
Err indicates the error that happened when storing the segments. This should only be accessed after FullReplyProcessed channel has been closed.
func (*ProcessedResult) FullReplyProcessed ¶
func (r *ProcessedResult) FullReplyProcessed() <-chan struct{}
FullReplyProcessed returns a channel that will be closed once the full reply has been processed.
func (*ProcessedResult) Stats ¶
func (r *ProcessedResult) Stats() Stats
Stats provides insights about storage and verification of segments.
func (*ProcessedResult) VerificationErrors ¶
func (r *ProcessedResult) VerificationErrors() serrors.List
VerificationErrors returns the list of verification errors that happened.
type SegStats ¶
type SegStats struct { // InsertedSegs are the log IDs of the inserted segments. InsertedSegs []string // UpdatedSegs are the log IDs of the updated segments. UpdatedSegs []string }
SegStats provides statistics about segment insertion/updates.
type SegWithHP ¶
type SegWithHP struct { Seg *seg.Meta HPGroup hiddenpath.GroupId }
SegWithHP is a segment with hidden path cfg ids.
type Segments ¶
type Segments struct { Segs []*seg.Meta SRevInfos []*path_mgmt.SignedRevInfo HPGroupID hiddenpath.GroupId }
Segments is a list of segments and revocations belonging to them. Optionally a hidden path group ID is attached.
type Stats ¶
type Stats struct { // VerifiedSegs contains all segments that were successfully verified. VerifiedSegs []*SegWithHP // StoredRevs contains all revocations that were verified and stored. StoredRevs []*path_mgmt.SignedRevInfo // VerifiedRevs contains all revocations that were verified. VerifiedRevs []*path_mgmt.SignedRevInfo // contains filtered or unexported fields }
Stats provides statistics about handling segments.
func (Stats) RevVerifyErrors ¶
RevVerifyErrors returns the amount of verification errors for revocations.
func (Stats) SegVerifyErrors ¶
SegVerifyErrors returns the amount of segment verification errors.
func (Stats) SegsInserted ¶
SegsInserted returns the amount of inserted segments.
func (Stats) SegsUpdated ¶
SegsUpdated returns the amount of updated segments.
type Storage ¶
type Storage interface { StoreSegs(context.Context, []*SegWithHP) (SegStats, error) StoreRevs(context.Context, []*path_mgmt.SignedRevInfo) error }
Storage is used to store segments and revocations.
type Verifier ¶
type Verifier interface {
Verify(context.Context, Segments, net.Addr) (chan segverifier.UnitResult, int)
}
Verifier is used to verify a segment reply.
Directories ¶
Path | Synopsis |
---|---|
Package mock_seghandler is a generated GoMock package.
|
Package mock_seghandler is a generated GoMock package. |