Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GatewayRegistry ¶
type GatewayRegistry struct {
// contains filtered or unexported fields
}
GatewayRegistry keeps route-to-backend mapping for the in-process gateway. It is database-backed so mappings survive process restarts.
func NewGatewayRegistry ¶
func NewGatewayRegistry(db *gorm.DB) (*GatewayRegistry, error)
func (*GatewayRegistry) DeleteRoute ¶
func (r *GatewayRegistry) DeleteRoute(ctx context.Context, routeKey string) error
func (*GatewayRegistry) ResolveByPath ¶
func (r *GatewayRegistry) ResolveByPath(path string) (Registration, string, bool)
func (*GatewayRegistry) UpsertRoute ¶
func (r *GatewayRegistry) UpsertRoute(ctx context.Context, route Registration) error
type K8sIngressRegistry ¶
type K8sIngressRegistry struct {
// contains filtered or unexported fields
}
func NewK8sIngressRegistry ¶
func NewK8sIngressRegistry(cfg K8sIngressRegistryConfig) (*K8sIngressRegistry, error)
func (*K8sIngressRegistry) DeleteRoute ¶
func (r *K8sIngressRegistry) DeleteRoute(ctx context.Context, routeKey string) error
func (*K8sIngressRegistry) UpsertRoute ¶
func (r *K8sIngressRegistry) UpsertRoute(ctx context.Context, route Registration) error
type PathRouteResolver ¶
type PathRouteResolver interface {
ResolveByPath(path string) (route Registration, matchedPrefix string, ok bool)
}
PathRouteResolver resolves an incoming request path to a registered route. matchedPrefix is the path prefix bound to the resolved backend.
type Registration ¶
type Registration struct {
RouteKey string
PathPrefix string
Backend Backend
Metadata map[string]string
}
Registration describes one app-session route bound to a concrete backend.
type RouteRegistry ¶
type RouteRegistry interface {
UpsertRoute(ctx context.Context, route Registration) error
DeleteRoute(ctx context.Context, routeKey string) error
}
RouteRegistry is the abstraction for route management backends such as Traefik API/File, in-process gateway, or a composite implementation.
type RouteRegistryHandler ¶
type RouteRegistryHandler struct {
// contains filtered or unexported fields
}
func NewRouteRegistryHandler ¶
func NewRouteRegistryHandler(repo interfaces.ContainerRepository, registry RouteRegistry, cfg *config.Config) *RouteRegistryHandler
func (*RouteRegistryHandler) Handle ¶
func (h *RouteRegistryHandler) Handle(evt event.Event)
type TraefikRegistry ¶
type TraefikRegistry struct {
// contains filtered or unexported fields
}
func NewTraefikRegistry ¶
func NewTraefikRegistry(cfg TraefikRegistryConfig) (*TraefikRegistry, error)
func (*TraefikRegistry) DeleteRoute ¶
func (r *TraefikRegistry) DeleteRoute(ctx context.Context, routeKey string) error
func (*TraefikRegistry) UpsertRoute ¶
func (r *TraefikRegistry) UpsertRoute(ctx context.Context, route Registration) error
Click to show internal directories.
Click to hide internal directories.