Documentation ¶
Overview ¶
Package http is a simple client for interacting with witnesses over HTTP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSTHTooOld = errors.New("STH too old")
ErrSTHTooOld is returned if the STH passed to Update needs to be updated.
Functions ¶
This section is empty.
Types ¶
type Witness ¶
Witness consists of the witness' URL and signature verifier.
func (Witness) GetLatestSTH ¶
GetLatestSTH returns a recent STH from the witness for the specified log ID.
func (Witness) Update ¶
func (w Witness) Update(ctx context.Context, logID string, sth []byte, proof [][]byte) ([]byte, error)
Update attempts to clock the witness forward for the given logID. The latest signed STH will be returned if this succeeds, or if the error is http.ErrSTHTooOld. In all other cases no STH should be expected.
Click to show internal directories.
Click to hide internal directories.