Documentation
¶
Overview ¶
Package modules contains the base of the module system used in the hotstuff project. The module system allows us to use different implementations of key components, such as the crypto module or the consensus module, and ensures that a module has access to the other modules it depends on.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a helper for setting up client modules.
type MetricsLogger ¶
MetricsLogger logs data in protobuf message format.
func NewJSONLogger ¶
func NewJSONLogger(wr io.Writer) (MetricsLogger, error)
NewJSONLogger returns a new metrics logger that logs to the specified writer.
func NopLogger ¶
func NopLogger() MetricsLogger
NopLogger returns a metrics logger that discards any messages. This is useful for testing and other situations where metrics logging is disabled.
type Module ¶
type Module interface {
// InitModule gives the module access to the other modules.
InitModule(mods *Modules)
}
Module is an interface for modules that need access to a client.
type Modules ¶
type Modules struct {
// contains filtered or unexported fields
}
Modules is the base of the module system. It contains only a few core modules that are shared between replicas and clients.
func (Modules) MetricsEventLoop ¶
MetricsEventLoop returns the metrics event loop. The metrics event loop is used for processing of measurement data.
func (Modules) MetricsLogger ¶
func (mod Modules) MetricsLogger() MetricsLogger
MetricsLogger returns the metrics logger.