Documentation
¶
Overview ¶
Package mcptools defines beszelscope's MCP tools and builds the server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
Hub Hub
HubURL *url.URL
HubVersion string // from the startup check; "" if unknown
TokenExpiresAt time.Time // zero if unknown
Logger *slog.Logger
Tracer trace.TracerProvider
Now func() time.Time
Version string // beszelscope's own version
}
Deps are everything the tools need, built by cmd/beszelscope.
type Hub ¶
type Hub interface {
Systems(ctx context.Context) ([]hub.System, error)
Services(ctx context.Context) ([]hub.Service, error)
Containers(ctx context.Context) ([]hub.Container, error)
SmartDevices(ctx context.Context) ([]hub.SmartDevice, error)
ZfsPools(ctx context.Context) ([]hub.ZfsPool, error)
Monitors(ctx context.Context) ([]hub.Monitor, error)
SystemDetails(ctx context.Context) ([]hub.SystemDetails, error)
SystemStats(ctx context.Context, systemID string, t hub.StatType, since time.Time) ([]hub.SystemStats, error)
ContainerStats(ctx context.Context, systemID string, t hub.StatType, since time.Time) ([]hub.ContainerStats, error)
LastStatsAt(ctx context.Context, systemID string) (time.Time, error)
MonitorStats(ctx context.Context, systemID string, t hub.StatType, since time.Time) ([]hub.MonitorStats, error)
PackageUpdates(ctx context.Context, systemID string) (hub.PackageUpdates, error)
}
Hub is the part of the hub client the tools read from.
Click to show internal directories.
Click to hide internal directories.