Documentation
¶
Index ¶
- type GRPCController
- func (c *GRPCController) GetOIDCValidationConfig() proxy.OIDCValidationConfig
- func (c *GRPCController) GetProxiesForCluster(clusterAddr string) []string
- func (c *GRPCController) RegisterProxyToCluster(ctx context.Context, clusterAddr, proxyID string) error
- func (c *GRPCController) SendServiceUpdateToCluster(ctx context.Context, accountID string, update *proto.ProxyMapping, ...)
- func (c *GRPCController) UnregisterProxyFromCluster(ctx context.Context, clusterAddr, proxyID string) error
- type Manager
- func (m Manager) CleanupStale(ctx context.Context, inactivityDuration time.Duration) error
- func (m Manager) Connect(ctx context.Context, proxyID, clusterAddress, ipAddress string) error
- func (m Manager) Disconnect(ctx context.Context, proxyID string) error
- func (m Manager) GetActiveClusterAddresses(ctx context.Context) ([]string, error)
- func (m Manager) Heartbeat(ctx context.Context, proxyID string) error
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) 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 ¶
NewManager creates a new proxy Manager
func (Manager) CleanupStale ¶
CleanupStale removes proxies that haven't sent heartbeat in the specified duration
func (Manager) Disconnect ¶
Disconnect marks a proxy as disconnected in the database
func (Manager) GetActiveClusterAddresses ¶
GetActiveClusterAddresses returns all unique cluster addresses for active proxies