Documentation ¶
Index ¶
- type GatewayURLQuerier
- type Plugin
- func (p *Plugin) FindReadyGateway(ctx context.Context, log *slog.Logger, method string) (tunserver.ReadyGateway, *slog.Logger, int64, error)
- func (p *Plugin) FindTunnel(stream grpc.ServerStream, rpcAPI modshared.RPCAPI) (bool, *slog.Logger, tunserver.FindHandle, error)
- func (p *Plugin) PrepareStreamForForwarding(stream grpc.ServerStream) (grpc.ServerStream, error)
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GatewayURLQuerier ¶
type GatewayURLQuerier struct {
// contains filtered or unexported fields
}
func NewGatewayURLQuerier ¶
func NewGatewayURLQuerier(kubeClient kubernetes.Interface, namespace, podLabelSelector, urlScheme, urlPort string) *GatewayURLQuerier
func (*GatewayURLQuerier) CachedGatewayURLs ¶
func (q *GatewayURLQuerier) CachedGatewayURLs(agentID int64) []string
func (*GatewayURLQuerier) PollGatewayURLs ¶
func (q *GatewayURLQuerier) PollGatewayURLs(ctx context.Context, agentID int64, cb tunserver.PollGatewayURLsCallback)
type Plugin ¶
type Plugin struct { Registry *Registry AgentkPool grpctool.PoolInterface GatewayQuerier tunserver.PollingGatewayURLQuerier API modshared.API OwnPrivateAPIURL string Creds credentials.PerRPCCredentials PollConfig retry.PollConfigFactory TryNewGatewayInterval time.Duration TunnelFindTimeout time.Duration }
func (*Plugin) FindReadyGateway ¶
func (*Plugin) FindTunnel ¶
func (*Plugin) PrepareStreamForForwarding ¶
func (p *Plugin) PrepareStreamForForwarding(stream grpc.ServerStream) (grpc.ServerStream, error)
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func (*Registry) FindTunnel ¶
func (*Registry) HandleTunnel ¶
func (r *Registry) HandleTunnel(ageCtx context.Context, server grpc.BidiStreamingServer[rpc.ConnectRequest, rpc.ConnectResponse]) error
HandleTunnel is called with server-side interface of the reverse tunnel. It registers the tunnel and blocks, waiting for a request to proxy through the tunnel. The method returns the error value to return to gRPC framework. ageCtx can be used to unblock the method if the tunnel is not being used already.
Click to show internal directories.
Click to hide internal directories.