agent

package
v0.0.0-...-eec2aef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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

View Source
const (
	BearerAuthScopes bearerAuthContextKey = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSpec

func GetSpec() (swagger *openapi3.T, err error)

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

func GetSpecJSON() ([]byte, error)

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

func GetSwagger() (*openapi3.T, error)

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

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

const (
	AgentCostHigh       AgentCost = "high"
	AgentCostLow        AgentCost = "low"
	AgentCostMedium     AgentCost = "medium"
	AgentCostMediumHigh AgentCost = "medium-high"
	AgentCostMediumLow  AgentCost = "medium-low"
)

Defines values for AgentCost.

func (AgentCost) Valid

func (e AgentCost) Valid() bool

Valid indicates whether the value is a known member of the AgentCost enum.

type AgentHealthStatus

type AgentHealthStatus string

AgentHealthStatus Current health status of the agent

const (
	AgentHealthStatusCongested   AgentHealthStatus = "congested"
	AgentHealthStatusReady       AgentHealthStatus = "ready"
	AgentHealthStatusUnavailable AgentHealthStatus = "unavailable"
)

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 AgentIdPath

type AgentIdPath = string

AgentIdPath defines model for AgentIdPath.

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

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"
	ListAgentsParamsHealthStatusUnavailable ListAgentsParamsHealthStatus = "unavailable"
)

Defines values for ListAgentsParamsHealthStatus.

func (ListAgentsParamsHealthStatus) Valid

Valid indicates whether the value is a known member of the ListAgentsParamsHealthStatus enum.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL