Documentation ¶
Overview ¶
Package omniwitness provides a single Main file that runs the omniwitness. Some components are left pluggable so this can be deployed on different runtimes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ConfigLogs is the config for the witness used in the omniwitness. // Its schema is LogConfig //go:embed logs.yaml ConfigLogs []byte )
Functions ¶
Types ¶
type Feeder ¶
type Feeder uint8
Feeder is an enum of the known feeder types.
func ParseFeeder ¶
ParseFeeder takes a string and returns a valid enum or an error.
func (*Feeder) UnmarshalYAML ¶
UnmarshalYAML populates the log from yaml using the unmarshal func provided.
type LogConfig ¶
type LogConfig struct {
Logs []LogInfo `yaml:"Logs"`
}
LogConfig contains a list of LogInfo (configuration options for a log).
type LogInfo ¶
type LogInfo struct { Origin string `yaml:"Origin"` PublicKey string `yaml:"PublicKey"` URL string `yaml:"URL"` Feeder Feeder `yaml:"Feeder"` UseCompact bool `yaml:"UseCompact"` }
LogInfo contains the details about a log.
type LogStatePersistence ¶
type LogStatePersistence = persistence.LogStatePersistence
LogStatePersistence describes functionality the omniwitness requires in order to persist its view of log state.
type LogStateReadOps ¶
type LogStateReadOps = persistence.LogStateReadOps
LogStateReadOps provides read-only operations on the stored state for a given log.
type LogStateWriteOps ¶
type LogStateWriteOps = persistence.LogStateWriteOps
LogStateWriteOps provides write operations on the stored state for a given log.
type OperatorConfig ¶
type OperatorConfig struct { WitnessKey string // RestDistributorBaseURL is optional, and if provided gives the base URL // to a distributor that takes witnessed checkpoints via a PUT request. // TODO(mhutchinson): This should be baked into the code when there is a public distributor. RestDistributorBaseURL string FeedInterval time.Duration DistributeInterval time.Duration }
OperatorConfig allows the bare minimum operator-specific configuration. This should only contain configuration details that are custom per-operator.