Documentation
¶
Overview ¶
Package agent provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Package agent provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- Constants
- func GetSpec() (swagger *openapi3.T, err error)
- func GetSpecJSON() ([]byte, error)
- func GetSwagger() (*openapi3.T, error)deprecated
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type Agent
- type AgentCost
- type AgentHealthStatus
- type AgentHeartbeatJSONRequestBody
- type AgentIdPath
- type AgentList
- type AgentRegistrationRequest
- type AgentRegistrationRequestCost
- type CreateAgentJSONRequestBody
- type Error
- type HeartbeatRequest
- type ListAgentsParams
- type ListAgentsParamsHealthStatus
Constants ¶
const (
BearerAuthScopes bearerAuthContextKey = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func GetSpec ¶
GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.
func GetSpecJSON ¶
GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.
func GetSwagger
deprecated
Types ¶
type Agent ¶
type Agent struct {
// AgentId Server-generated unique identifier
AgentId *string `json:"agent_id,omitempty"`
// Cost Relative cost weight for placement decisions
Cost *AgentCost `json:"cost,omitempty"`
// CreateTime Timestamp when the agent was first registered
CreateTime *time.Time `json:"create_time,omitempty"`
// Environment Environment label for the agent
Environment *string `json:"environment,omitempty"`
// HealthStatus Current health status of the agent
HealthStatus *AgentHealthStatus `json:"health_status,omitempty"`
// LastHeartbeat Timestamp of last heartbeat received
LastHeartbeat *time.Time `json:"last_heartbeat,omitempty"`
// Name Unique name of the agent
Name *string `json:"name,omitempty"`
// ServiceTypes List of service types this agent can provide
ServiceTypes *[]string `json:"service_types,omitempty"`
// TopicName NATS topic name for this agent
TopicName *string `json:"topic_name,omitempty"`
// UpdateTime Timestamp when the agent was last updated
UpdateTime *time.Time `json:"update_time,omitempty"`
}
Agent Full agent resource representation
type AgentCost ¶
type AgentCost string
AgentCost Relative cost weight for placement decisions
type AgentHealthStatus ¶
type AgentHealthStatus string
AgentHealthStatus Current health status of the agent
const ( AgentHealthStatusCongested AgentHealthStatus = "congested" AgentHealthStatusReady AgentHealthStatus = "ready" )
Defines values for AgentHealthStatus.
func (AgentHealthStatus) Valid ¶
func (e AgentHealthStatus) Valid() bool
Valid indicates whether the value is a known member of the AgentHealthStatus enum.
type AgentHeartbeatJSONRequestBody ¶
type AgentHeartbeatJSONRequestBody = HeartbeatRequest
AgentHeartbeatJSONRequestBody defines body for AgentHeartbeat for application/json ContentType.
type AgentList ¶
type AgentList struct {
Agents *[]Agent `json:"agents,omitempty"`
// NextPageToken Token for retrieving the next page of results
NextPageToken *string `json:"next_page_token,omitempty"`
}
AgentList Paginated list of agents
type AgentRegistrationRequest ¶
type AgentRegistrationRequest struct {
// Cost Relative cost weight for placement decisions
Cost AgentRegistrationRequestCost `json:"cost"`
// Environment Environment label for the agent
Environment string `json:"environment"`
// Name Unique name of the agent
Name string `json:"name"`
// ServiceTypes List of service types this agent can provide
ServiceTypes []string `json:"service_types"`
// TopicName NATS topic name for this agent (must start with dcm.agent.)
TopicName string `json:"topic_name"`
}
AgentRegistrationRequest Request body for agent registration
type AgentRegistrationRequestCost ¶
type AgentRegistrationRequestCost string
AgentRegistrationRequestCost Relative cost weight for placement decisions
const ( AgentRegistrationRequestCostHigh AgentRegistrationRequestCost = "high" AgentRegistrationRequestCostLow AgentRegistrationRequestCost = "low" AgentRegistrationRequestCostMedium AgentRegistrationRequestCost = "medium" AgentRegistrationRequestCostMediumHigh AgentRegistrationRequestCost = "medium-high" AgentRegistrationRequestCostMediumLow AgentRegistrationRequestCost = "medium-low" )
Defines values for AgentRegistrationRequestCost.
func (AgentRegistrationRequestCost) Valid ¶
func (e AgentRegistrationRequestCost) Valid() bool
Valid indicates whether the value is a known member of the AgentRegistrationRequestCost enum.
type CreateAgentJSONRequestBody ¶
type CreateAgentJSONRequestBody = AgentRegistrationRequest
CreateAgentJSONRequestBody defines body for CreateAgent for application/json ContentType.
type Error ¶
type Error struct {
// Detail Human-readable explanation specific to this occurrence
Detail *string `json:"detail,omitempty"`
// Instance URI reference for this specific error occurrence
Instance *string `json:"instance,omitempty"`
// Status HTTP status code
Status *int `json:"status,omitempty"`
// Title Short human-readable summary of the problem
Title string `json:"title"`
// Type URI reference identifying the error type
Type string `json:"type"`
}
Error RFC 7807 compliant error response
type HeartbeatRequest ¶
type HeartbeatRequest struct {
// ConsumerLag Number of unprocessed messages in the agent's NATS consumer
ConsumerLag int64 `json:"consumer_lag"`
// Timestamp Timestamp of this heartbeat (used for monotonicity check)
Timestamp time.Time `json:"timestamp"`
}
HeartbeatRequest Request body for agent heartbeat
type ListAgentsParams ¶
type ListAgentsParams struct {
// HealthStatus Filter agents by health status
HealthStatus *ListAgentsParamsHealthStatus `form:"health_status,omitempty" json:"health_status,omitempty"`
// MaxPageSize Maximum number of results per page
MaxPageSize *int `form:"max_page_size,omitempty" json:"max_page_size,omitempty"`
// PageToken Token for pagination
PageToken *string `form:"page_token,omitempty" json:"page_token,omitempty"`
}
ListAgentsParams defines parameters for ListAgents.
type ListAgentsParamsHealthStatus ¶
type ListAgentsParamsHealthStatus string
ListAgentsParamsHealthStatus defines parameters for ListAgents.
const ( ListAgentsParamsHealthStatusCongested ListAgentsParamsHealthStatus = "congested" ListAgentsParamsHealthStatusReady ListAgentsParamsHealthStatus = "ready" )
Defines values for ListAgentsParamsHealthStatus.
func (ListAgentsParamsHealthStatus) Valid ¶
func (e ListAgentsParamsHealthStatus) Valid() bool
Valid indicates whether the value is a known member of the ListAgentsParamsHealthStatus enum.