primary

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogID      string        // H(public key), then hex-encoded
	TreeID     int64         // Merkle tree identifier used by Trillian
	Prefix     string        // The portion between base URL and st/v0 (may be "")
	MaxRange   int64         // Maximum number of leaves per get-leaves request
	Deadline   time.Duration // Deadline used for gRPC requests
	Interval   time.Duration // Cosigning frequency
	ShardStart uint64        // Shard interval start (num seconds since UNIX epoch)

	// Witnesses map trusted witness identifiers to public keys
	Witnesses map[merkle.Hash]types.PublicKey
}

Config is a collection of log parameters

type Primary

type Primary struct {
	Config
	PublicHTTPMux   *http.ServeMux
	InternalHTTPMux *http.ServeMux
	TrillianClient  db.Client          // provides access to the Trillian backend
	Signer          crypto.Signer      // provides access to Ed25519 private key
	Stateman        state.StateManager // coordinates access to (co)signed tree heads
	DNS             dns.Verifier       // checks if domain name knows a public key
	Secondary       client.Client
}

Primary is an instance of the log's primary node

func (Primary) Deadline

func (p Primary) Deadline() time.Duration

func (Primary) InternalHTTPHandlers

func (p Primary) InternalHTTPHandlers() []handler.Handler

InternalHTTPHandlers() returns all internal handlers

func (Primary) LogID

func (p Primary) LogID() string

func (Primary) Prefix

func (p Primary) Prefix() string

Implementing handler.Config

func (Primary) PublicHTTPHandlers

func (p Primary) PublicHTTPHandlers() []handler.Handler

PublicHTTPHandlers returns all external handlers

Jump to

Keyboard shortcuts

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