service

package
v1.7.35 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTransportOnContext

func AddTransportOnContext(ctx context.Context) context.Context

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.

func (*InternalHandlers) BuildHTTP

func (m *InternalHandlers) BuildHTTP(rootCtx context.Context, serviceName string) (http.Handler, error)

BuildHTTP builds an HTTP handler.

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) BuildHTTP

func (m *Manager) BuildHTTP(rootCtx context.Context, serviceName string) (http.Handler, error)

BuildHTTP Creates a http.Handler for a service configuration.

func (*Manager) LaunchHealthCheck

func (m *Manager) LaunchHealthCheck(ctx context.Context)

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

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.

Directories

Path Synopsis
hrw
p2c
wrr

Jump to

Keyboard shortcuts

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