client

package
v0.0.0-...-50f8504 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

DeployAgent deploys an agent to the orchestrator

func (*HTTPOrchestratorClient) GetHealth

GetHealth checks the health of the orchestrator

func (*HTTPOrchestratorClient) GetJWKS

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

Jump to

Keyboard shortcuts

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