Documentation ¶
Overview ¶
Package ui exposes utilities to get a Handler for the Grafana Alloy UI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
RegisterRoutes registers routes to the provided mux.Router for serving the Grafana Alloy UI. The UI will be served relative to pathPrefix. If no pathPrefix is specified, the UI will be served at root.
By default, the UI is retrieved from the ./internal/web/ui/build directory relative to working directory, assuming that Alloy is run from the repo root. However, if the builtinassets Go tag is present, the built UI will be embedded into the binary; run go generate -tags builtinassets for this package to generate the assets to embed.
RegisterRoutes catches all requests from pathPrefix and so should only be invoked after all other routes have been registered.
RegisterRoutes is not intended for public use and will only work properly when called from github.com/grafana/alloy.
Types ¶
This section is empty.