http

package
v0.0.0-...-7d7216e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package http contains private implementation details for the FirmwareTransparency witness.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Witness

type Witness struct {
	// contains filtered or unexported fields
}

Witness is the core state & handler implementation of the FT Witness

func NewWitness

func NewWitness(ws WitnessStore, logURL string, logSigVerifier note.Verifier, pollInterval time.Duration) (*Witness, error)

NewWitness creates a new Witness.

func (*Witness) Poll

func (s *Witness) Poll(ctx context.Context) error

Poll periodically polls the FT log for updating the witness checkpoint. It only returns on error (when it doesn't start its own polling thread)

func (*Witness) RegisterHandlers

func (s *Witness) RegisterHandlers(r *mux.Router)

RegisterHandlers registers HTTP handlers for firmware transparency endpoints.

type WitnessStore

type WitnessStore interface {
	// Store puts the checkpoint into Witness Store
	StoreCP([]byte) error

	// Retrieve gets the stored checkpoint.
	RetrieveCP() ([]byte, error)
}

WitnessStore is the interface to the Witness Store, for storage of latest checkpoint

Jump to

Keyboard shortcuts

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