Documentation
¶
Overview ¶
Package http contains private implementation details for the distributor server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Distributor ¶
type Distributor interface {
// GetLogs returns a list of all log IDs the distributor is aware of, sorted
// by the ID.
GetLogs(ctx context.Context) ([]string, error)
// GetWitnesses returns a list of all witness verifier keys the distributor is
// aware of, sorted by the ID.
GetWitnesses(ctx context.Context) ([]string, error)
// GetCheckpointN gets the largest checkpoint for a given log that has at least `n` signatures.
GetCheckpointN(ctx context.Context, logID string, n uint32) ([]byte, error)
// GetCheckpointWitness gets the largest checkpoint for the log that was witnessed by the given witness.
GetCheckpointWitness(ctx context.Context, logID, witID string) ([]byte, error)
// Distribute adds a new witnessed checkpoint to be distributed. This checkpoint must be signed
// by both the log and the witness specified, and be larger than any previous checkpoint distributed
// for this pair.
Distribute(ctx context.Context, logID, witID string, nextRaw []byte) error
}
Distributor persists witnessed checkpoints and allows querying of them.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the core handler implementation of the witness.
func (*Server) RegisterHandlers ¶
RegisterHandlers registers HTTP handlers for witness endpoints.
Click to show internal directories.
Click to hide internal directories.