Documentation
¶
Overview ¶
Package webug implements a web-based debug/troubleshooting/introspection system for the BMDB. It's optimized for use by developers and trained operators, prioritizing information density, fast navigation and heavy interlinking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(ctx context.Context, conn *bmdb.Connection, mux *http.ServeMux, enableStrictConsistency bool) error
Register webug on an HTTP mux, using a BMDB connection pool.
The given context will be used not only to time out the registration call, but also used to run a BMDB schema fetching goroutine that will attempt to fetch newer versions of the schema every hour.
This is a low-level function useful when tying webug into an existing web application. If you just want to run webug on a separate port that's configured by flags, use Config and Config.RegisterFlags.
Types ¶
type Config ¶
type Config struct { // If set, start a webug interface on an HTTP listener bound to the given address. WebugListenAddress string // Enables strict consistency WebugDBFetchStrict bool }
Config describes the webug interface configuration. This should be embedded inside your component's Config object.
To configure, either set values or call RegisterFlags before flag.Parse.
To run after configuration, call Start.
func (*Config) Start ¶
Start the webug interface in the foreground if enabled. The returned error will be either a configuration/connection error returned as soon as possible, or a context expiration error.
The given context will be used for all connections from the webug interface to the given BMDB connection.