Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIDescriptor ¶
func APIDescriptor(server reflection.ServiceInfoProvider) *info.APIDescriptor
Types ¶
type Connection ¶
type Connection struct { Log *slog.Logger Descriptor *info.APIDescriptor Client rpc.ReverseTunnelClient // OwnServerConn is a connection to the gRPC server tunclient tunnels requests to. OwnServerConn grpc.ClientConnInterface PollConfig retry.PollConfigFactory OnActive func(ConnectionInterface) OnIdle func(ConnectionInterface) PrepareMetadata func(metadata.MD) metadata.MD }
func (*Connection) Run ¶
func (c *Connection) Run(attemptCtx, pollCtx context.Context)
type ConnectionFactory ¶
type ConnectionFactory func(onActive, onIdle func(ConnectionInterface)) ConnectionInterface
ConnectionFactory helps to inject fake connections for testing.
type ConnectionInterface ¶
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
ConnectionManager manages a pool of connections and their lifecycles.
func NewConnectionManager ¶
func NewConnectionManager(minIdleConnections, maxConnections, scaleUpStep int32, maxIdleTime time.Duration, connectionFactory ConnectionFactory) *ConnectionManager
func (*ConnectionManager) Run ¶
func (m *ConnectionManager) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.