Documentation
¶
Index ¶
- type A2APolicy
- type AIBackend
- type AIRuntimeConfig
- type Agent
- type AgentDeployment
- type AgentGatewayConfig
- type AppProtocol
- type BackendAuth
- type BackendTLS
- type CORS
- type DesiredState
- type DirectResponse
- type DockerComposeConfig
- type Endpoint
- type FilterOrPolicy
- type GatewayAddress
- type GatewayDestination
- type HTTPTransport
- type HeaderMatch
- type HeaderModifier
- type HeaderValue
- type HeaderValueMatch
- type HealthStatus
- type HostRedirect
- type IPFamily
- type Identity
- type InboundProtocol
- type KubernetesRuntimeConfig
- type LoadBalancer
- type LoadBalancerHealthPolicy
- type LoadBalancerMode
- type LoadBalancerScope
- type LocalBind
- type LocalListener
- type LocalListenerProtocol
- type LocalMCPServer
- type LocalRoute
- type LocalRuntimeConfig
- type LocalTCPRoute
- type LocalTLSServerConfig
- type LocalWorkload
- type Locality
- type MCPAuthorization
- type MCPBackend
- type MCPServer
- type MCPServerDeployment
- type MCPServerType
- type MCPTarget
- type MethodMatch
- type NamespacedHostname
- type NetworkAddress
- type NetworkMode
- type OpenAPITargetSpec
- type OutboundProtocol
- type PathMatch
- type PathRedirect
- type QueryMatch
- type QueryValueMatch
- type RemoteMCPServer
- type RequestMirror
- type RequestRedirect
- type ResolvedMCPServerConfig
- type RetryPolicy
- type RouteBackend
- type RouteFilter
- type RouteMatch
- type RuntimeConfigType
- type RuntimeTranslator
- type SSETargetSpec
- type Service
- type ServiceBackend
- type SimpleBackend
- type StdioTargetSpec
- type TCPFilterOrPolicy
- type TCPRouteBackend
- type Target
- type TimeoutPolicy
- type TransportType
- type URLRewrite
- type Workload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIBackend ¶
type AIBackend struct {
Name string `json:"name" yaml:"name"`
}
AIBackend represents an AI backend (placeholder)
type AIRuntimeConfig ¶
type AIRuntimeConfig struct {
Local *LocalRuntimeConfig
Kubernetes *KubernetesRuntimeConfig
Type RuntimeConfigType
}
type Agent ¶
type Agent struct {
Name string `json:"name"`
Version string `json:"version"`
Deployment AgentDeployment `json:"deployment"`
// ResolvedMCPServers contains the MCP server connection info for this agent
// Used to generate ConfigMap for Kubernetes deployments
ResolvedMCPServers []ResolvedMCPServerConfig `json:"resolvedMCPServers,omitempty"`
}
Agent represents a single Agent configuration
type AgentDeployment ¶
type AgentGatewayConfig ¶
type AgentGatewayConfig struct {
Config any `json:"config" yaml:"config"` // required type
Binds []LocalBind `json:"binds,omitempty" yaml:"binds,omitempty"`
Workloads []LocalWorkload `json:"workloads,omitempty" yaml:"workloads,omitempty"`
Services []Service `json:"services,omitempty" yaml:"services,omitempty"`
}
AgentGatewayConfig represents the main configuration structure for AgentGateway
type AppProtocol ¶
type AppProtocol string
AppProtocol represents application protocol
const ( AppProtocolHTTP11 AppProtocol = "Http11" AppProtocolHTTP2 AppProtocol = "Http2" AppProtocolGRPC AppProtocol = "Grpc" )
type BackendAuth ¶
type BackendAuth struct {
// Placeholder for backend auth configuration
Type string `json:"type" yaml:"type"`
Config any `json:"config,omitempty" yaml:"config,omitempty"`
}
BackendAuth represents backend authentication
type BackendTLS ¶
type BackendTLS struct {
// This would contain TLS configuration but is complex in Rust
// Simplified representation
Insecure bool `json:"insecure,omitempty" yaml:"insecure,omitempty"`
InsecureHost bool `json:"insecureHost,omitempty" yaml:"insecureHost,omitempty"`
Cert string `json:"cert,omitempty" yaml:"cert,omitempty"`
Key string `json:"key,omitempty" yaml:"key,omitempty"`
Root string `json:"root,omitempty" yaml:"root,omitempty"`
}
BackendTLS represents backend TLS configuration
type CORS ¶
type CORS struct {
AllowOrigins []string `json:"allowOrigins,omitempty" yaml:"allowOrigins,omitempty"`
AllowMethods []string `json:"allowMethods,omitempty" yaml:"allowMethods,omitempty"`
AllowHeaders []string `json:"allowHeaders,omitempty" yaml:"allowHeaders,omitempty"`
ExposeHeaders []string `json:"exposeHeaders,omitempty" yaml:"exposeHeaders,omitempty"`
MaxAge *int `json:"maxAge,omitempty" yaml:"maxAge,omitempty"`
AllowCredentials bool `json:"allowCredentials,omitempty" yaml:"allowCredentials,omitempty"`
}
CORS represents CORS configuration
type DesiredState ¶
type DesiredState struct {
MCPServers []*MCPServer `json:"mcpServers"`
Agents []*Agent `json:"agents"`
}
DesiredState represents the desired set of MCPServevrs the user wishes to run locally
type DirectResponse ¶
type DirectResponse struct {
Status int `json:"status" yaml:"status"`
Body string `json:"body,omitempty" yaml:"body,omitempty"`
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
}
DirectResponse represents direct response
type DockerComposeConfig ¶
type Endpoint ¶
type Endpoint struct {
WorkloadUID string `json:"workloadUid" yaml:"workloadUid"`
Port map[uint16]uint16 `json:"port" yaml:"port"`
Status HealthStatus `json:"status" yaml:"status"`
}
Endpoint represents a service endpoint
type FilterOrPolicy ¶
type FilterOrPolicy struct {
// Filters
RequestHeaderModifier *HeaderModifier `json:"requestHeaderModifier,omitempty" yaml:"requestHeaderModifier,omitempty"`
ResponseHeaderModifier *HeaderModifier `json:"responseHeaderModifier,omitempty" yaml:"responseHeaderModifier,omitempty"`
RequestRedirect *RequestRedirect `json:"requestRedirect,omitempty" yaml:"requestRedirect,omitempty"`
URLRewrite *URLRewrite `json:"urlRewrite,omitempty" yaml:"urlRewrite,omitempty"`
RequestMirror *RequestMirror `json:"requestMirror,omitempty" yaml:"requestMirror,omitempty"`
DirectResponse *DirectResponse `json:"directResponse,omitempty" yaml:"directResponse,omitempty"`
CORS *CORS `json:"cors,omitempty" yaml:"cors,omitempty"`
// Policies
MCPAuthorization *MCPAuthorization `json:"mcpAuthorization,omitempty" yaml:"mcpAuthorization,omitempty"`
A2A *A2APolicy `json:"a2a,omitempty" yaml:"a2a,omitempty"`
AI any `json:"ai,omitempty" yaml:"ai,omitempty"` // Skipped complex type
BackendTLS *BackendTLS `json:"backendTLS,omitempty" yaml:"backendTLS,omitempty"`
BackendAuth *BackendAuth `json:"backendAuth,omitempty" yaml:"backendAuth,omitempty"`
LocalRateLimit []any `json:"localRateLimit,omitempty" yaml:"localRateLimit,omitempty"` // Skipped complex type
RemoteRateLimit any `json:"remoteRateLimit,omitempty" yaml:"remoteRateLimit,omitempty"` // Skipped complex type
JWTAuth any `json:"jwtAuth,omitempty" yaml:"jwtAuth,omitempty"` // Skipped complex type
ExtAuthz any `json:"extAuthz,omitempty" yaml:"extAuthz,omitempty"` // Skipped complex type
// Traffic Policy
Timeout *TimeoutPolicy `json:"timeout,omitempty" yaml:"timeout,omitempty"`
Retry *RetryPolicy `json:"retry,omitempty" yaml:"retry,omitempty"`
}
FilterOrPolicy represents route filters and policies
type GatewayAddress ¶
type GatewayAddress struct {
Destination GatewayDestination `json:"destination" yaml:"destination"`
HBONEMTLSPort uint16 `json:"hboneMtlsPort" yaml:"hboneMtlsPort"`
}
GatewayAddress represents a gateway address
type GatewayDestination ¶
type GatewayDestination struct {
Address *NetworkAddress `json:"address,omitempty" yaml:"address,omitempty"`
Hostname *NamespacedHostname `json:"hostname,omitempty" yaml:"hostname,omitempty"`
}
GatewayDestination represents gateway destination
type HTTPTransport ¶
HTTPTransport defines the configuration for an HTTP transport
type HeaderMatch ¶
type HeaderMatch struct {
Name string `json:"name" yaml:"name"`
Value HeaderValueMatch `json:"value" yaml:"value"`
}
HeaderMatch represents header matching
type HeaderModifier ¶
type HeaderModifier struct {
Add map[string]string `json:"add,omitempty" yaml:"add,omitempty"`
Set map[string]string `json:"set,omitempty" yaml:"set,omitempty"`
Remove []string `json:"remove,omitempty" yaml:"remove,omitempty"`
}
HeaderModifier represents header modification
type HeaderValue ¶
type HeaderValueMatch ¶
type HeaderValueMatch struct {
Exact string `json:"exact,omitempty" yaml:"exact,omitempty"`
Regex string `json:"regex,omitempty" yaml:"regex,omitempty"`
}
HeaderValueMatch represents header value matching
type HealthStatus ¶
type HealthStatus string
HealthStatus represents health status
const ( HealthStatusHealthy HealthStatus = "Healthy" HealthStatusUnhealthy HealthStatus = "Unhealthy" )
type HostRedirect ¶
type HostRedirect struct {
Full string `json:"full,omitempty" yaml:"full,omitempty"`
Host string `json:"host,omitempty" yaml:"host,omitempty"`
Port *uint16 `json:"port,omitempty" yaml:"port,omitempty"`
}
HostRedirect represents host redirection
type Identity ¶
type Identity struct {
TrustDomain string `json:"trustDomain" yaml:"trustDomain"`
Namespace string `json:"namespace" yaml:"namespace"`
ServiceAccount string `json:"serviceAccount" yaml:"serviceAccount"`
}
Identity represents a workload identity
type InboundProtocol ¶
type InboundProtocol string
InboundProtocol represents the inbound protocol
const ( InboundProtocolTCP InboundProtocol = "TCP" InboundProtocolHBONE InboundProtocol = "HBONE" InboundProtocolLegacyIstioMTLS InboundProtocol = "LegacyIstioMtls" )
type KubernetesRuntimeConfig ¶
type KubernetesRuntimeConfig struct {
Agents []*v1alpha2.Agent `json:"agents"`
RemoteMCPServers []*v1alpha2.RemoteMCPServer `json:"remoteMCPServers"`
MCPServers []*kmcpv1alpha1.MCPServer `json:"mcpServers"`
ConfigMaps []*corev1.ConfigMap `json:"configMaps,omitempty"`
}
type LoadBalancer ¶
type LoadBalancer struct {
RoutingPreferences []LoadBalancerScope `json:"routingPreferences" yaml:"routingPreferences"`
Mode LoadBalancerMode `json:"mode" yaml:"mode"`
HealthPolicy LoadBalancerHealthPolicy `json:"healthPolicy" yaml:"healthPolicy"`
}
LoadBalancer represents load balancer configuration
type LoadBalancerHealthPolicy ¶
type LoadBalancerHealthPolicy string
LoadBalancerHealthPolicy represents load balancer health policy
const ( LoadBalancerHealthPolicyOnlyHealthy LoadBalancerHealthPolicy = "OnlyHealthy" LoadBalancerHealthPolicyAllowAll LoadBalancerHealthPolicy = "AllowAll" )
type LoadBalancerMode ¶
type LoadBalancerMode string
LoadBalancerMode represents load balancer mode
const ( LoadBalancerModeStandard LoadBalancerMode = "Standard" LoadBalancerModeStrict LoadBalancerMode = "Strict" LoadBalancerModeFailover LoadBalancerMode = "Failover" )
type LoadBalancerScope ¶
type LoadBalancerScope string
LoadBalancerScope represents load balancer scope
const ( LoadBalancerScopeRegion LoadBalancerScope = "Region" LoadBalancerScopeZone LoadBalancerScope = "Zone" LoadBalancerScopeSubzone LoadBalancerScope = "Subzone" LoadBalancerScopeNode LoadBalancerScope = "Node" LoadBalancerScopeCluster LoadBalancerScope = "Cluster" LoadBalancerScopeNetwork LoadBalancerScope = "Network" )
type LocalBind ¶
type LocalBind struct {
Port uint16 `json:"port" yaml:"port"`
Listeners []LocalListener `json:"listeners" yaml:"listeners"`
}
LocalBind represents a network bind configuration
type LocalListener ¶
type LocalListener struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
GatewayName string `json:"gatewayName,omitempty" yaml:"gatewayName,omitempty"`
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
Protocol LocalListenerProtocol `json:"protocol" yaml:"protocol"`
TLS *LocalTLSServerConfig `json:"tls,omitempty" yaml:"tls,omitempty"`
Routes []LocalRoute `json:"routes,omitempty" yaml:"routes,omitempty"`
TCPRoutes []LocalTCPRoute `json:"tcpRoutes,omitempty" yaml:"tcpRoutes,omitempty"`
}
LocalListener represents a listener configuration
type LocalListenerProtocol ¶
type LocalListenerProtocol string
LocalListenerProtocol represents the protocol type
const ( LocalListenerProtocolHTTP LocalListenerProtocol = "HTTP" LocalListenerProtocolHTTPS LocalListenerProtocol = "HTTPS" LocalListenerProtocolTLS LocalListenerProtocol = "TLS" LocalListenerProtocolTCP LocalListenerProtocol = "TCP" LocalListenerProtocolHBONE LocalListenerProtocol = "HBONE" )
type LocalMCPServer ¶
type LocalMCPServer struct {
// Deployment defines how to deploy the MCP server
Deployment MCPServerDeployment `json:"deployment"`
// TransportType defines the type of mcp server being run
TransportType TransportType `json:"transportType"`
// HTTP defines the configuration for an HTTP transport.(only for TransportTypeHTTP)
HTTP *HTTPTransport `json:"http,omitempty"`
}
LocalMCPServer represents the configuration for running an MCPServer locally
type LocalRoute ¶
type LocalRoute struct {
RouteName string `json:"name,omitempty" yaml:"name,omitempty"`
RuleName string `json:"ruleName,omitempty" yaml:"ruleName,omitempty"`
Hostnames []string `json:"hostnames,omitempty" yaml:"hostnames,omitempty"`
Matches []RouteMatch `json:"matches,omitempty" yaml:"matches,omitempty"`
Policies *FilterOrPolicy `json:"policies,omitempty" yaml:"policies,omitempty"`
Backends []RouteBackend `json:"backends,omitempty" yaml:"backends,omitempty"`
}
LocalRoute represents an HTTP route configuration
type LocalRuntimeConfig ¶
type LocalRuntimeConfig struct {
DockerCompose *DockerComposeConfig
AgentGateway *AgentGatewayConfig
}
type LocalTCPRoute ¶
type LocalTCPRoute struct {
RouteName string `json:"name,omitempty" yaml:"name,omitempty"`
RuleName string `json:"ruleName,omitempty" yaml:"ruleName,omitempty"`
Hostnames []string `json:"hostnames,omitempty" yaml:"hostnames,omitempty"`
Policies *TCPFilterOrPolicy `json:"policies,omitempty" yaml:"policies,omitempty"`
Backends []TCPRouteBackend `json:"backends,omitempty" yaml:"backends,omitempty"`
}
LocalTCPRoute represents a TCP route configuration
type LocalTLSServerConfig ¶
type LocalTLSServerConfig struct {
Cert string `json:"cert" yaml:"cert"`
Key string `json:"key" yaml:"key"`
}
LocalTLSServerConfig represents TLS server configuration
type LocalWorkload ¶
type LocalWorkload struct {
Workload Workload `json:",inline" yaml:",inline"`
Services map[string]map[uint16]uint16 `json:"services,omitempty" yaml:"services,omitempty"`
}
LocalWorkload represents a local workload
type Locality ¶
type Locality struct {
Region string `json:"region" yaml:"region"`
Zone string `json:"zone" yaml:"zone"`
Subzone string `json:"subzone" yaml:"subzone"`
}
Locality represents geographical locality
type MCPAuthorization ¶
type MCPAuthorization struct {
Rules any `json:"rules" yaml:"rules"` // RuleSet - skipped complex type
}
MCPAuthorization represents MCP authorization policy
type MCPBackend ¶
type MCPBackend struct {
Targets []MCPTarget `json:"targets" yaml:"targets"`
}
MCPBackend represents an MCP backend
type MCPServer ¶
type MCPServer struct {
// Name is the unique name of the MCPServer
Name string `json:"name"`
// MCPServerType represents whether the MCP server is remote or local
MCPServerType MCPServerType `json:"mcpServerType"`
// Remote defines how to route to a remote MCP server
Remote *RemoteMCPServer `json:"remote,omitempty"`
// Local defines how to deploy the MCP server locally
Local *LocalMCPServer `json:"local,omitempty"`
// Namespace is the target namespace for Kubernetes deployments (optional, defaults to "kagent")
Namespace string `json:"namespace,omitempty"`
}
MCPServer represents a single MCPServer configuration
type MCPServerDeployment ¶
type MCPServerDeployment struct {
// Image defines the container image to to deploy the MCP server.
Image string `json:"image,omitempty"`
// Cmd defines the command to run in the container to start the mcp server.
Cmd string `json:"cmd,omitempty"`
// Args defines the arguments to pass to the command.
Args []string `json:"args,omitempty"`
// Env defines the environment variables to set in the container.
Env map[string]string `json:"env,omitempty"`
}
MCPServerDeployment
type MCPServerType ¶
type MCPServerType string
const ( // MCPServerTypeRemote indicates that the MCP server is hosted remotely MCPServerTypeRemote MCPServerType = "remote" // MCPServerTypeLocal indicates that the MCP server is hosted locally MCPServerTypeLocal MCPServerType = "local" )
type MCPTarget ¶
type MCPTarget struct {
Name string `json:"name" yaml:"name"`
SSE *SSETargetSpec `json:"sse,omitempty" yaml:"sse,omitempty"`
Stdio *StdioTargetSpec `json:"stdio,omitempty" yaml:"stdio,omitempty"`
OpenAPI *OpenAPITargetSpec `json:"openapi,omitempty" yaml:"openapi,omitempty"`
Filters []any `json:"filters,omitempty" yaml:"filters,omitempty"` // Skipped complex type
}
MCPTarget represents an MCP target
type MethodMatch ¶
type MethodMatch struct {
Method string `json:"method" yaml:"method"`
}
MethodMatch represents HTTP method matching
type NamespacedHostname ¶
type NamespacedHostname struct {
Namespace string `json:"namespace" yaml:"namespace"`
Hostname string `json:"hostname" yaml:"hostname"`
}
NamespacedHostname represents a hostname within a namespace
type NetworkAddress ¶
type NetworkAddress struct {
Network string `json:"network" yaml:"network"`
Address net.IP `json:"address" yaml:"address"`
}
NetworkAddress represents an address on a specific network
type NetworkMode ¶
type NetworkMode string
NetworkMode represents the network mode
const ( NetworkModeStandard NetworkMode = "Standard" NetworkModeHostNetwork NetworkMode = "HostNetwork" )
type OpenAPITargetSpec ¶
type OpenAPITargetSpec struct {
Host string `json:"host" yaml:"host"`
Port uint32 `json:"port" yaml:"port"`
Schema any `json:"schema" yaml:"schema"` // OpenAPI schema
}
OpenAPITargetSpec represents OpenAPI target specification
type OutboundProtocol ¶
type OutboundProtocol string
OutboundProtocol represents the outbound protocol
const ( OutboundProtocolTCP OutboundProtocol = "TCP" OutboundProtocolHBONE OutboundProtocol = "HBONE" OutboundProtocolDoubleHBONE OutboundProtocol = "DOUBLEHBONE" )
type PathMatch ¶
type PathMatch struct {
Exact string `json:"exact,omitempty" yaml:"exact,omitempty"`
PathPrefix string `json:"pathPrefix,omitempty" yaml:"pathPrefix,omitempty"`
Regex *struct {
Pattern string `json:"pattern" yaml:"pattern"`
Length int `json:"length" yaml:"length"`
} `json:"regex,omitempty" yaml:"regex,omitempty"`
}
PathMatch represents path matching
type PathRedirect ¶
type PathRedirect struct {
Full string `json:"full,omitempty" yaml:"full,omitempty"`
Prefix string `json:"prefix,omitempty" yaml:"prefix,omitempty"`
}
PathRedirect represents path redirection
type QueryMatch ¶
type QueryMatch struct {
Name string `json:"name" yaml:"name"`
Value QueryValueMatch `json:"value" yaml:"value"`
}
QueryMatch represents query parameter matching
type QueryValueMatch ¶
type QueryValueMatch struct {
Exact string `json:"exact,omitempty" yaml:"exact,omitempty"`
Regex string `json:"regex,omitempty" yaml:"regex,omitempty"`
}
QueryValueMatch represents query value matching
type RemoteMCPServer ¶
type RemoteMCPServer struct {
Host string
Port uint32
Path string
Headers []HeaderValue
}
RemoteMCPServer represents the configuration for connecting to a remotely hosted MCPServer
type RequestMirror ¶
type RequestMirror struct {
Backend SimpleBackend `json:"backend" yaml:"backend"`
Percentage float64 `json:"percentage" yaml:"percentage"`
}
RequestMirror represents request mirroring
type RequestRedirect ¶
type RequestRedirect struct {
Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
Authority *HostRedirect `json:"authority,omitempty" yaml:"authority,omitempty"`
Path *PathRedirect `json:"path,omitempty" yaml:"path,omitempty"`
Status *int `json:"status,omitempty" yaml:"status,omitempty"`
}
RequestRedirect represents request redirection
type ResolvedMCPServerConfig ¶ added in v0.1.11
type ResolvedMCPServerConfig struct {
Name string `json:"name"`
Type string `json:"type"` // "command" or "remote"
URL string `json:"url,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
}
This gets saved into the mcp-servers.json file for each agent
type RetryPolicy ¶
type RetryPolicy struct {
Attempts int `json:"attempts" yaml:"attempts"`
PerTryTimeout time.Duration `json:"perTryTimeout" yaml:"perTryTimeout"`
RetryOn []string `json:"retryOn,omitempty" yaml:"retryOn,omitempty"`
}
RetryPolicy represents retry policy
type RouteBackend ¶
type RouteBackend struct {
Weight int `json:"weight" yaml:"weight"`
Service *ServiceBackend `json:"service,omitempty" yaml:"service,omitempty"`
Opaque *Target `json:"opaque,omitempty" yaml:"opaque,omitempty"`
Dynamic *struct{} `json:"dynamic,omitempty" yaml:"dynamic,omitempty"`
MCP *MCPBackend `json:"mcp,omitempty" yaml:"mcp,omitempty"`
AI *AIBackend `json:"ai,omitempty" yaml:"ai,omitempty"`
Invalid bool `json:"invalid,omitempty" yaml:"invalid,omitempty"`
Filters []RouteFilter `json:"filters,omitempty" yaml:"filters,omitempty"`
Host string `json:"host,omitempty" yaml:"host,omitempty"`
}
RouteBackend represents a route backend
type RouteFilter ¶
type RouteFilter struct {
RequestHeaderModifier *HeaderModifier `json:"requestHeaderModifier,omitempty" yaml:"requestHeaderModifier,omitempty"`
ResponseHeaderModifier *HeaderModifier `json:"responseHeaderModifier,omitempty" yaml:"responseHeaderModifier,omitempty"`
RequestRedirect *RequestRedirect `json:"requestRedirect,omitempty" yaml:"requestRedirect,omitempty"`
URLRewrite *URLRewrite `json:"urlRewrite,omitempty" yaml:"urlRewrite,omitempty"`
RequestMirror *RequestMirror `json:"requestMirror,omitempty" yaml:"requestMirror,omitempty"`
DirectResponse *DirectResponse `json:"directResponse,omitempty" yaml:"directResponse,omitempty"`
CORS *CORS `json:"cors,omitempty" yaml:"cors,omitempty"`
}
RouteFilter represents route filters
type RouteMatch ¶
type RouteMatch struct {
Headers []HeaderMatch `json:"headers,omitempty" yaml:"headers,omitempty"`
Path PathMatch `json:"path" yaml:"path"`
Method *MethodMatch `json:"method,omitempty" yaml:"method,omitempty"`
Query []QueryMatch `json:"query,omitempty" yaml:"query,omitempty"`
}
RouteMatch represents route matching criteria
type RuntimeConfigType ¶
type RuntimeConfigType string
const ( RuntimeConfigTypeLocal RuntimeConfigType = "local" RuntimeConfigTypeKubernetes RuntimeConfigType = "kubernetes" )
type RuntimeTranslator ¶
type RuntimeTranslator interface {
TranslateRuntimeConfig(
ctx context.Context,
desired *DesiredState,
) (*AIRuntimeConfig, error)
}
RuntimeTranslator is the interface for translating registry objects to runtime configuration objects.
type SSETargetSpec ¶
type SSETargetSpec struct {
Host string `json:"host" yaml:"host"`
Port uint32 `json:"port" yaml:"port"`
Path string `json:"path" yaml:"path"`
}
SSETargetSpec represents SSE target specification
type Service ¶
type Service struct {
Name string `json:"name" yaml:"name"`
Namespace string `json:"namespace" yaml:"namespace"`
Hostname string `json:"hostname" yaml:"hostname"`
VIPs []NetworkAddress `json:"vips" yaml:"vips"`
Ports map[uint16]uint16 `json:"ports" yaml:"ports"`
AppProtocols map[uint16]AppProtocol `json:"appProtocols,omitempty" yaml:"appProtocols,omitempty"`
Endpoints map[string]Endpoint `json:"endpoints,omitempty" yaml:"endpoints,omitempty"`
SubjectAltNames []string `json:"subjectAltNames,omitempty" yaml:"subjectAltNames,omitempty"`
Waypoint *GatewayAddress `json:"waypoint,omitempty" yaml:"waypoint,omitempty"`
LoadBalancer *LoadBalancer `json:"loadBalancer,omitempty" yaml:"loadBalancer,omitempty"`
IPFamilies *IPFamily `json:"ipFamilies,omitempty" yaml:"ipFamilies,omitempty"`
}
Service represents a service in the mesh
type ServiceBackend ¶
type ServiceBackend struct {
Name NamespacedHostname `json:"name" yaml:"name"`
Port uint16 `json:"port" yaml:"port"`
}
ServiceBackend represents a service backend
type SimpleBackend ¶
type SimpleBackend struct {
Service *ServiceBackend `json:"service,omitempty" yaml:"service,omitempty"`
Opaque *Target `json:"opaque,omitempty" yaml:"opaque,omitempty"`
Invalid bool `json:"invalid,omitempty" yaml:"invalid,omitempty"`
}
SimpleBackend represents simpler backend types
type StdioTargetSpec ¶
type StdioTargetSpec struct {
Cmd string `json:"cmd" yaml:"cmd"`
Args []string `json:"args,omitempty" yaml:"args,omitempty"`
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
}
StdioTargetSpec represents stdio target specification
type TCPFilterOrPolicy ¶
type TCPFilterOrPolicy struct {
BackendTLS *BackendTLS `json:"backendTLS,omitempty" yaml:"backendTLS,omitempty"`
}
TCPFilterOrPolicy represents TCP route policies
type TCPRouteBackend ¶
type TCPRouteBackend struct {
Weight int `json:"weight" yaml:"weight"`
Backend SimpleBackend `json:"backend" yaml:"backend"`
}
TCPRouteBackend represents a TCP route backend
type Target ¶
type Target struct {
Address *net.TCPAddr `json:"address,omitempty" yaml:"address,omitempty"`
Hostname *struct {
Host string `json:"host" yaml:"host"`
Port uint16 `json:"port" yaml:"port"`
} `json:"hostname,omitempty" yaml:"hostname,omitempty"`
}
Target represents a backend target
type TimeoutPolicy ¶
type TimeoutPolicy struct {
RequestTimeout *time.Duration `json:"requestTimeout,omitempty" yaml:"requestTimeout,omitempty"`
BackendRequestTimeout *time.Duration `json:"backendRequestTimeout,omitempty" yaml:"backendRequestTimeout,omitempty"`
}
TimeoutPolicy represents timeout policy
type TransportType ¶
type TransportType string
MCPServerTransportType defines the type of transport for the MCP server.
const ( // TransportTypeStdio indicates that the MCP server uses standard input/output for communication. TransportTypeStdio TransportType = "stdio" // TransportTypeHTTP indicates that the MCP server uses Streamable HTTP for communication. TransportTypeHTTP TransportType = "http" )
type URLRewrite ¶
type URLRewrite struct {
Authority *HostRedirect `json:"authority,omitempty" yaml:"authority,omitempty"`
Path *PathRedirect `json:"path,omitempty" yaml:"path,omitempty"`
}
URLRewrite represents URL rewriting
type Workload ¶
type Workload struct {
WorkloadIPs []net.IP `json:"workloadIps" yaml:"workloadIps"`
Waypoint *GatewayAddress `json:"waypoint,omitempty" yaml:"waypoint,omitempty"`
NetworkGateway *GatewayAddress `json:"networkGateway,omitempty" yaml:"networkGateway,omitempty"`
Protocol InboundProtocol `json:"protocol" yaml:"protocol"`
NetworkMode NetworkMode `json:"networkMode" yaml:"networkMode"`
UID string `json:"uid,omitempty" yaml:"uid,omitempty"`
Name string `json:"name" yaml:"name"`
Namespace string `json:"namespace" yaml:"namespace"`
TrustDomain string `json:"trustDomain,omitempty" yaml:"trustDomain,omitempty"`
ServiceAccount string `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"`
Network string `json:"network,omitempty" yaml:"network,omitempty"`
WorkloadName string `json:"workloadName,omitempty" yaml:"workloadName,omitempty"`
WorkloadType string `json:"workloadType,omitempty" yaml:"workloadType,omitempty"`
CanonicalName string `json:"canonicalName,omitempty" yaml:"canonicalName,omitempty"`
CanonicalRev string `json:"canonicalRevision,omitempty" yaml:"canonicalRevision,omitempty"`
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
Node string `json:"node,omitempty" yaml:"node,omitempty"`
AuthPolicies []string `json:"authorizationPolicies,omitempty" yaml:"authorizationPolicies,omitempty"`
Status HealthStatus `json:"status" yaml:"status"`
ClusterID string `json:"clusterId" yaml:"clusterId"`
Locality Locality `json:"locality,omitempty" yaml:"locality,omitempty"`
Services []NamespacedHostname `json:"services,omitempty" yaml:"services,omitempty"`
Capacity uint32 `json:"capacity" yaml:"capacity"`
}
Workload represents a workload in the mesh