Documentation
¶
Index ¶
- type ClientOption
- type DeployAgentRequest
- type DeployAgentResponse
- type HTTPOrchestratorClient
- func (c *HTTPOrchestratorClient) DeleteAgent(ctx context.Context, agentID string) error
- func (c *HTTPOrchestratorClient) DeployAgent(ctx context.Context, req *DeployAgentRequest) (*DeployAgentResponse, error)
- func (c *HTTPOrchestratorClient) GetHealth(ctx context.Context) (*HealthResponse, error)
- func (c *HTTPOrchestratorClient) GetJWKS(ctx context.Context) (*JWKSResponse, error)
- func (c *HTTPOrchestratorClient) ScaleAgent(ctx context.Context, agentID string, replicas int) error
- func (c *HTTPOrchestratorClient) TestConnection(ctx context.Context) error
- func (c *HTTPOrchestratorClient) UpdateAgent(ctx context.Context, agentID string, image string) error
- type HealthResponse
- type JWKSResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOption ¶
type ClientOption func(*HTTPOrchestratorClient) error
ClientOption is a functional option for configuring HTTPOrchestratorClient
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
WithTimeout sets the request timeout
type DeployAgentRequest ¶
type DeployAgentRequest struct {
ID string `json:"id"`
Name string `json:"name"`
Image string `json:"image"`
Subdomain string `json:"subdomain"`
Namespace string `json:"namespace"`
Labels map[string]string `json:"labels,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
}
DeployAgentRequest represents a request to deploy an agent to the orchestrator
type DeployAgentResponse ¶
type DeployAgentResponse struct {
ID string `json:"id"`
K8sService string `json:"k8s_service"`
K8sNamespace string `json:"k8s_namespace"`
Status string `json:"status"`
}
DeployAgentResponse represents a response from deploying an agent
type HTTPOrchestratorClient ¶
type HTTPOrchestratorClient struct {
// contains filtered or unexported fields
}
HTTPOrchestratorClient is an HTTP-based client for communicating with the orchestrator
func NewHTTPOrchestratorClient ¶
func NewHTTPOrchestratorClient(baseURL string, cfg *config.Config, opts ...ClientOption) (*HTTPOrchestratorClient, error)
NewHTTPOrchestratorClient creates a new HTTP orchestrator client
func (*HTTPOrchestratorClient) DeleteAgent ¶
func (c *HTTPOrchestratorClient) DeleteAgent(ctx context.Context, agentID string) error
DeleteAgent deletes an agent from the orchestrator
func (*HTTPOrchestratorClient) DeployAgent ¶
func (c *HTTPOrchestratorClient) DeployAgent(ctx context.Context, req *DeployAgentRequest) (*DeployAgentResponse, error)
DeployAgent deploys an agent to the orchestrator
func (*HTTPOrchestratorClient) GetHealth ¶
func (c *HTTPOrchestratorClient) GetHealth(ctx context.Context) (*HealthResponse, error)
GetHealth checks the health of the orchestrator
func (*HTTPOrchestratorClient) GetJWKS ¶
func (c *HTTPOrchestratorClient) GetJWKS(ctx context.Context) (*JWKSResponse, error)
GetJWKS retrieves the JWKS from the orchestrator
func (*HTTPOrchestratorClient) ScaleAgent ¶
func (c *HTTPOrchestratorClient) ScaleAgent(ctx context.Context, agentID string, replicas int) error
ScaleAgent scales the number of replicas for an agent
func (*HTTPOrchestratorClient) TestConnection ¶
func (c *HTTPOrchestratorClient) TestConnection(ctx context.Context) error
TestConnection tests the connection to the orchestrator
func (*HTTPOrchestratorClient) UpdateAgent ¶
func (c *HTTPOrchestratorClient) UpdateAgent(ctx context.Context, agentID string, image string) error
UpdateAgent updates the image of an agent
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
Details map[string]interface{} `json:"details,omitempty"`
}
HealthResponse represents the health status of the orchestrator
type JWKSResponse ¶
type JWKSResponse struct {
Keys []map[string]interface{} `json:"keys"`
}
JWKSResponse represents the JWKS endpoint response