clusteragent

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *Config, k8sClient client.Client, k8sConfig *rest.Config, logger *slog.Logger) (*Agent, error)

func (*Agent) Start

func (a *Agent) Start(ctx context.Context) error

func (*Agent) Stop

func (a *Agent) Stop()

type AuthConfig added in v0.7.0

type AuthConfig struct {
	Type     string // "serviceaccount", "bearer", "basic", "none"
	Token    string
	Username string
	Password string
}

AuthConfig represents authentication configuration for a route

type Config

type Config struct {
	ServerURL         string
	PlaneType         string // "dataplane" or "buildplane"
	PlaneName         string
	ClientCertPath    string
	ClientKeyPath     string
	ServerCAPath      string
	ReconnectDelay    time.Duration
	HeartbeatInterval time.Duration
	RequestTimeout    time.Duration
	Routes            []RouteConfig // Backend service routes for HTTP proxy
}

type Route added in v0.7.0

type Route struct {
	Name      string
	Backend   string // "kubernetes", "http", "https"
	Endpoint  string
	Auth      AuthConfig
	Transport http.RoundTripper
}

Route represents a configured backend service route. This is used to route requests to different backend services.

type RouteConfig added in v0.7.0

type RouteConfig struct {
	Name     string
	Endpoint string
	Auth     AuthConfig
}

RouteConfig represents the configuration for a backend route

type Router added in v0.7.0

type Router struct {
	// contains filtered or unexported fields
}

Router routes HTTP tunnel requests to different backend services

func NewRouter added in v0.7.0

func NewRouter(k8sConfig *rest.Config, routeConfigs []RouteConfig, logger *slog.Logger) (*Router, error)

NewRouter creates a new router with configured routes

func (*Router) Route added in v0.7.0

Route routes an HTTP tunnel request to the appropriate backend service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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