manager

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCController

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

GRPCController is a concrete implementation that manages proxy clusters and sends updates directly via gRPC.

func NewGRPCController

func NewGRPCController(proxyGRPCServer *nbgrpc.ProxyServiceServer, meter metric.Meter) (*GRPCController, error)

NewGRPCController creates a new GRPCController.

func (*GRPCController) ClusterRequireSubdomain added in v0.67.0

func (c *GRPCController) ClusterRequireSubdomain(clusterAddr string) *bool

ClusterRequireSubdomain returns whether the cluster requires a subdomain label. Returns nil when no proxy has reported the capability (defaults to false).

func (*GRPCController) ClusterSupportsCustomPorts added in v0.67.0

func (c *GRPCController) ClusterSupportsCustomPorts(clusterAddr string) *bool

ClusterSupportsCustomPorts returns whether any proxy in the cluster supports custom ports.

func (*GRPCController) GetOIDCValidationConfig

func (c *GRPCController) GetOIDCValidationConfig() proxy.OIDCValidationConfig

GetOIDCValidationConfig returns the OIDC validation configuration from the gRPC server.

func (*GRPCController) GetProxiesForCluster

func (c *GRPCController) GetProxiesForCluster(clusterAddr string) []string

GetProxiesForCluster returns all proxy IDs registered for a specific cluster.

func (*GRPCController) RegisterProxyToCluster

func (c *GRPCController) RegisterProxyToCluster(ctx context.Context, clusterAddr, proxyID string) error

RegisterProxyToCluster registers a proxy to a specific cluster for routing.

func (*GRPCController) SendServiceUpdateToCluster

func (c *GRPCController) SendServiceUpdateToCluster(ctx context.Context, accountID string, update *proto.ProxyMapping, clusterAddr string)

SendServiceUpdateToCluster sends a service update to a specific proxy cluster.

func (*GRPCController) UnregisterProxyFromCluster

func (c *GRPCController) UnregisterProxyFromCluster(ctx context.Context, clusterAddr, proxyID string) error

UnregisterProxyFromCluster removes a proxy from a cluster.

type Manager

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

Manager handles all proxy operations

func NewManager

func NewManager(store store, meter metric.Meter) (*Manager, error)

NewManager creates a new proxy Manager

func (Manager) CleanupStale

func (m Manager) CleanupStale(ctx context.Context, inactivityDuration time.Duration) error

CleanupStale removes proxies that haven't sent heartbeat in the specified duration

func (Manager) Connect

func (m Manager) Connect(ctx context.Context, proxyID, clusterAddress, ipAddress string) error

Connect registers a new proxy connection in the database

func (Manager) Disconnect

func (m Manager) Disconnect(ctx context.Context, proxyID string) error

Disconnect marks a proxy as disconnected in the database

func (Manager) GetActiveClusterAddresses

func (m Manager) GetActiveClusterAddresses(ctx context.Context) ([]string, error)

GetActiveClusterAddresses returns all unique cluster addresses for active proxies

func (Manager) GetActiveClusters added in v0.67.0

func (m Manager) GetActiveClusters(ctx context.Context) ([]proxy.Cluster, error)

GetActiveClusters returns all active proxy clusters with their connected proxy count.

func (Manager) Heartbeat

func (m Manager) Heartbeat(ctx context.Context, proxyID, clusterAddress, ipAddress string) error

Heartbeat updates the proxy's last seen timestamp

Jump to

Keyboard shortcuts

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