Documentation
¶
Overview ¶
Package manager is the client of giantswarm-repo-manager, the MCP server behind muster that keeps the repository inventory. `devctl repo status` asks it first -- through the person's muster endpoint, as the person -- and falls back to the engine's own checks when it cannot be reached. The tool's answer carries the set-up state as the engine's structured result, so both paths print the same verdicts.
Index ¶
Constants ¶
const ToolGetRepository = "giantswarm-repo-manager_get_repository"
ToolGetRepository is the muster tool that returns one inventory record.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsTool ¶
IsTool asserts toolError: the manager answered with an error or an answer the client does not understand.
func IsUnreachable ¶
IsUnreachable asserts unreachableError: the endpoint did not answer, or not with MCP. The caller falls back to the engine.
Types ¶
type Client ¶
type Client struct {
// Endpoint is the muster MCP endpoint (https://muster.example/mcp).
Endpoint string
// Token is the person's bearer token for the endpoint; empty sends none.
Token string
// HTTPClient overrides the HTTP client; nil means one with a timeout.
HTTPClient *http.Client
// Version is reported as the client's version in the handshake.
Version string
}
Client calls giantswarm-repo-manager's tools through a muster endpoint over MCP's streamable HTTP transport.
type Record ¶
type Record struct {
// Repository is owner/name.
Repository string `json:"repository"`
// Team is the slug of the team file that declares it; empty when no file
// does.
Team string `json:"team,omitempty"`
// Setup is the engine's check result the inventory stores.
Setup *reconcile.Result `json:"setup,omitempty"`
// UpdatedAt is when the record was refreshed.
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
Record is one inventory record of giantswarm-repo-manager as `devctl repo status` reads it. The manager's tool schema is filled in by its own change; the client reads the fields below and ignores the rest, and a payload that is the set-up result itself is accepted as one too.