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.
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) 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) 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 Segments ¶
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 []*seg.Meta // contains filtered or unexported fields }
Stats provides statistics about handling segments.
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, []*seg.Meta) (SegStats, error) StoreRevs(context.Context, []*path_mgmt.RevInfo) 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. |