Documentation
¶
Overview ¶
Package client contains a simple RESTful client that retrieves information from a distributor at a known URL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestDistributor ¶
type RestDistributor struct {
// contains filtered or unexported fields
}
RestDistributor is a client that fetches data via RESTful HTTP calls.
func NewRestDistributor ¶
func NewRestDistributor(baseURL string, client *http.Client) *RestDistributor
NewRestDistributor constructs a new client.
func (*RestDistributor) GetCheckpointN ¶
func (d *RestDistributor) GetCheckpointN(l LogID, n uint) ([]byte, error)
GetCheckpointN returns the freshest checkpoint for the log that at least N witnesses have provided signatures for.
func (*RestDistributor) GetCheckpointWitness ¶
func (d *RestDistributor) GetCheckpointWitness(l LogID, w string) ([]byte, error)
GetCheckpointWitness returns the latest checkpoint that a named witness has provided for the given log.
func (*RestDistributor) GetLogs ¶
func (d *RestDistributor) GetLogs() ([]LogID, error)
GetLogs returns all logs that the distributor knows about.
func (*RestDistributor) GetWitnesses ¶ added in v0.1.1
func (d *RestDistributor) GetWitnesses() ([]string, error)
GetWitnesses returns the verifier keys for all witnesses that the distributor knows about.
Click to show internal directories.
Click to hide internal directories.