client

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 LogID

type LogID string

LogID is the globally unique name for a log.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL