client

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

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.

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.

Jump to

Keyboard shortcuts

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