Documentation
¶
Index ¶
- func AddTransportOnContext(ctx context.Context) context.Context
- type InternalHandlers
- type Manager
- type ManagerFactory
- type ProxyBuilder
- type ServiceBuilder
- type SpiffeX509Source
- type TransportManager
- func (t *TransportManager) Get(name string) (*dynamic.ServersTransport, error)
- func (t *TransportManager) GetRoundTripper(name string) (http.RoundTripper, error)
- func (t *TransportManager) GetTLSConfig(name string) (*tls.Config, error)
- func (t *TransportManager) Update(newConfigs map[string]*dynamic.ServersTransport)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InternalHandlers ¶
type InternalHandlers struct {
// contains filtered or unexported fields
}
InternalHandlers is the internal HTTP handlers builder.
func NewInternalHandlers ¶
func NewInternalHandlers(apiHandler, rest, metricsHandler, pingHandler, dashboard, acmeHTTP http.Handler) *InternalHandlers
NewInternalHandlers creates a new InternalHandlers.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager The service manager.
func NewManager ¶
func NewManager(configs map[string]*runtime.ServiceInfo, observabilityMgr *middleware.ObservabilityMgr, routinePool *safe.Pool, transportManager httputil.TransportManager, proxyBuilder ProxyBuilder, serviceBuilders ...ServiceBuilder) *Manager
NewManager creates a new Manager.
func (*Manager) LaunchHealthCheck ¶
LaunchHealthCheck launches the health checks.
func (*Manager) SetMiddlewareChainBuilder ¶
func (m *Manager) SetMiddlewareChainBuilder(middlewareChainBuilder middlewareChainBuilder)
SetMiddlewareChainBuilder sets the MiddlewareChainBuilder.
type ManagerFactory ¶
type ManagerFactory struct {
// contains filtered or unexported fields
}
ManagerFactory a factory of service manager.
func NewManagerFactory ¶
func NewManagerFactory(staticConfiguration static.Configuration, routinesPool *safe.Pool, observabilityMgr *middleware.ObservabilityMgr, transportManager *TransportManager, proxyBuilder ProxyBuilder, acmeHTTPHandler http.Handler) *ManagerFactory
NewManagerFactory creates a new ManagerFactory.
func (*ManagerFactory) Build ¶
func (f *ManagerFactory) Build(configuration *runtime.Configuration) *Manager
Build creates a service manager.
type ProxyBuilder ¶
type ProxyBuilder interface {
Build(cfgName string, targetURL *url.URL, passHostHeader, preservePath bool, flushInterval time.Duration) (http.Handler, error)
Update(configs map[string]*dynamic.ServersTransport)
}
ProxyBuilder builds reverse proxy handlers.
type ServiceBuilder ¶
type ServiceBuilder interface {
BuildHTTP(rootCtx context.Context, serviceName string) (http.Handler, error)
}
ServiceBuilder is a Service builder.
type SpiffeX509Source ¶
type SpiffeX509Source interface {
x509svid.Source
x509bundle.Source
}
SpiffeX509Source allows to retrieve a x509 SVID and bundle.
type TransportManager ¶
type TransportManager struct {
// contains filtered or unexported fields
}
TransportManager handles transports for backend communication.
func NewTransportManager ¶
func NewTransportManager(spiffeX509Source SpiffeX509Source) *TransportManager
NewTransportManager creates a new TransportManager.
func (*TransportManager) Get ¶
func (t *TransportManager) Get(name string) (*dynamic.ServersTransport, error)
Get gets transport by name.
func (*TransportManager) GetRoundTripper ¶
func (t *TransportManager) GetRoundTripper(name string) (http.RoundTripper, error)
GetRoundTripper gets a roundtripper corresponding to the given transport name.
func (*TransportManager) GetTLSConfig ¶
func (t *TransportManager) GetTLSConfig(name string) (*tls.Config, error)
GetTLSConfig gets a TLS config corresponding to the given transport name.
func (*TransportManager) Update ¶
func (t *TransportManager) Update(newConfigs map[string]*dynamic.ServersTransport)
Update updates the transport configurations.