Documentation
¶
Index ¶
- type AgentStatus
- type ClientStatus
- type MCPServerStatus
- type ResourceStatus
- type Server
- func (s *Server) A2AGateway() *a2a.Gateway
- func (s *Server) Close()
- func (s *Server) Handler() http.Handler
- func (s *Server) LogBuffer() *logging.LogBuffer
- func (s *Server) RegistryServer() *registry.Server
- func (s *Server) ReloadHandler() *reload.Handler
- func (s *Server) SetA2AGateway(a2aGateway *a2a.Gateway)
- func (s *Server) SetAllowedOrigins(origins []string)
- func (s *Server) SetAuth(authType, token, header string)
- func (s *Server) SetDockerClient(cli dockerclient.DockerClient)
- func (s *Server) SetLogBuffer(buffer *logging.LogBuffer)
- func (s *Server) SetProvisionerRegistry(r *provisioner.Registry, serverName string)
- func (s *Server) SetRegistryServer(r *registry.Server)
- func (s *Server) SetReloadHandler(h *reload.Handler)
- func (s *Server) SetStackName(name string)
- type ServerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentStatus ¶
type AgentStatus struct {
// Core identification
Name string `json:"name"`
Status string `json:"status"` // "running", "stopped", "error", "unavailable"
// Variant: "local" (container-based) or "remote" (A2A only)
Variant string `json:"variant"`
// Container fields (populated for local/container-based agents)
Image string `json:"image,omitempty"`
ContainerID string `json:"containerId,omitempty"`
Uses []config.ToolSelector `json:"uses,omitempty"`
// A2A fields (populated when agent has A2A capability)
HasA2A bool `json:"hasA2A"`
Role string `json:"role,omitempty"` // "local" or "remote"
URL string `json:"url,omitempty"` // A2A endpoint URL
Endpoint string `json:"endpoint,omitempty"` // A2A RPC endpoint
SkillCount int `json:"skillCount,omitempty"` // Number of A2A skills
Skills []string `json:"skills,omitempty"` // A2A skill names
Description string `json:"description,omitempty"` // Agent description
}
AgentStatus contains unified status for all agents (local containers and remote A2A). This merges container state with A2A protocol state into a single representation.
type ClientStatus ¶
type ClientStatus struct {
Name string `json:"name"`
Slug string `json:"slug"`
Detected bool `json:"detected"`
Linked bool `json:"linked"`
Transport string `json:"transport"`
ConfigPath string `json:"configPath,omitempty"`
}
ClientStatus describes an LLM client's detection and link state.
type MCPServerStatus ¶
type MCPServerStatus struct {
Name string `json:"name"`
Transport string `json:"transport"`
Endpoint string `json:"endpoint"`
Initialized bool `json:"initialized"`
ToolCount int `json:"toolCount"`
Tools []string `json:"tools"`
External bool `json:"external"`
LocalProcess bool `json:"localProcess"`
SSH bool `json:"ssh"`
SSHHost string `json:"sshHost,omitempty"`
OpenAPI bool `json:"openapi"`
OpenAPISpec string `json:"openapiSpec,omitempty"`
Healthy *bool `json:"healthy,omitempty"`
LastCheck *string `json:"lastCheck,omitempty"`
HealthError string `json:"healthError,omitempty"`
}
MCPServerStatus mirrors the mcp.MCPServerStatus type for API responses.
type ResourceStatus ¶
type ResourceStatus struct {
Name string `json:"name"`
Image string `json:"image"`
Status string `json:"status"`
}
ResourceStatus contains status information for a resource container.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides the combined API server for gridctl.
func (*Server) A2AGateway ¶
A2AGateway returns the A2A gateway.
func (*Server) Close ¶
func (s *Server) Close()
Close performs cleanup of the API server's managed resources.
func (*Server) RegistryServer ¶
RegistryServer returns the registry server.
func (*Server) ReloadHandler ¶
ReloadHandler returns the reload handler.
func (*Server) SetA2AGateway ¶
SetA2AGateway sets the A2A gateway for agent-to-agent communication.
func (*Server) SetAllowedOrigins ¶
SetAllowedOrigins sets the CORS allowed origins for the server.
func (*Server) SetAuth ¶
SetAuth configures authentication for the server. When configured, all requests (except /health and /ready) must include a valid token.
func (*Server) SetDockerClient ¶
func (s *Server) SetDockerClient(cli dockerclient.DockerClient)
SetDockerClient sets the Docker client for container operations.
func (*Server) SetLogBuffer ¶
SetLogBuffer sets the log buffer for gateway logs.
func (*Server) SetProvisionerRegistry ¶
func (s *Server) SetProvisionerRegistry(r *provisioner.Registry, serverName string)
SetProvisionerRegistry sets the provisioner registry for client detection.
func (*Server) SetRegistryServer ¶
SetRegistryServer sets the registry server for prompt/skill management.
func (*Server) SetReloadHandler ¶
SetReloadHandler sets the reload handler for hot reload support.
func (*Server) SetStackName ¶
SetStackName sets the stack name for container lookups.
type ServerInfo ¶
ServerInfo mirrors the mcp.ServerInfo type for API responses.