package util

import "github.com/google/trillian/util"

Package util holds various utility functions used throughout the Trillian codebase.

Index

Functions

func AwaitSignal

func AwaitSignal(ctx context.Context, doneFn func())

AwaitSignal waits for standard termination signals, then runs the given function. Can early return if the passed in context is canceled, in which case the function is not run.

func StartHTTPServer

func StartHTTPServer(addr, certFile, keyFile string) error

StartHTTPServer starts an HTTP server on the given address.

Source Files

doc.go process.go

Directories

PathSynopsis
util/clockPackage clock contains time utilities, and types that allow mocking system time in tests.
util/election
util/election2Package election2 provides master election tools, and interfaces for plugging in a custom underlying mechanism.
util/election2/etcdPackage etcd provides an implementation of master election based on etcd.
util/election2/testonlyPackage testonly contains an Election implementation for testing.
Version
v1.3.13
Published
Feb 16, 2021
Platform
js/wasm
Imports
7 packages
Last checked
2 hours ago

Tools for package owners.