witness

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: ISC Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OriginHash added in v0.9.0

func OriginHash(origin string) string

OriginHash returns the lowercase hex-encoded SHA-256 of the log origin, which identifies the log in the witness monitoring URL space per c2sp.org/tlog-witness:

GET <monitoring prefix>/<origin hash>/checkpoint

Types

type Config

type Config struct {
	Name       string
	KeyEd25519 ed25519.PrivateKey
	KeyMLDSA44 *mldsa.PrivateKey

	MirrorName string
	KeyMirror  *mldsa.PrivateKey

	Backend ctlog.Backend
	Lock    ctlog.LockBackend
	Log     *slog.Logger
}

type Witness

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

func NewWitness

func NewWitness(ctx context.Context, config *Config) (*Witness, error)

func (*Witness) Handler

func (w *Witness) Handler() http.Handler

func (*Witness) Logs added in v0.7.0

func (w *Witness) Logs() (all, mirrored []string)

func (*Witness) Metrics

func (w *Witness) Metrics() []prometheus.Collector

func (*Witness) MirrorVerifierKey added in v0.9.0

func (w *Witness) MirrorVerifierKey() (string, bool)

func (*Witness) PullLogList added in v0.7.0

func (w *Witness) PullLogList(ctx context.Context, url string, mirror bool) (err error)

func (*Witness) VerifierKeys added in v0.9.0

func (w *Witness) VerifierKeys() []string

Jump to

Keyboard shortcuts

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