Documentation
¶
Overview ¶
Package webapi exposes the read-only HTTP contract consumed by the web viewer.
Index ¶
- Constants
- func NewHandler(store *hotsnapshot.SnapshotStore) http.Handler
- func NewHandlerWithTopology(store *hotsnapshot.SnapshotStore, options TopologyOptions) http.Handler
- func Run(ctx context.Context, address string, handler http.Handler, options ...Option) error
- type Handler
- type Option
- type TopologyOptions
Constants ¶
const APIVersion = "v1"
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(store *hotsnapshot.SnapshotStore) http.Handler
NewHandler creates an HTTP handler backed by store. A nil store is valid and makes graph-dependent endpoints return INDEX_NOT_READY.
func NewHandlerWithTopology ¶ added in v0.10.0
func NewHandlerWithTopology(store *hotsnapshot.SnapshotStore, options TopologyOptions) http.Handler
NewHandlerWithTopology creates a viewer handler with the optional generation-pinned topology API enabled. Existing callers can continue using NewHandler and retain the symbol and LGVB-only surface.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves read-only viewer requests from one published snapshot store. It never accesses LadybugDB directly and never mutates the store.
type Option ¶
type Option func(*settings)
Option configures Run.
type TopologyOptions ¶ added in v0.10.0
TopologyOptions supplies the installation metadata needed by the topology endpoint. The ordinary viewer endpoints do not need it and keep their existing constructor and response contracts.