connectutil

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package connectutil provides a reference implementation for Connect integrated with the Gate proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireEndpointName

func RequireEndpointName(ln EndpointListener) connect.EndpointListener

RequireEndpointName requires that an EndpointWatch provides the name in metadata.

func RequireTunnelSessionID

func RequireTunnelSessionID(ln TunnelListener) connect.TunnelListener

RequireTunnelSessionID requires that a tunnel provides session id metadata.

Types

type Endpoint

type Endpoint interface {
	Name() string         // The endpoint name.
	connect.EndpointWatch // The watching endpoint.
}

Endpoint is an endpoint (server) used to propose sessions or receive rejections.

type EndpointListener

type EndpointListener interface {
	AcceptEndpoint(context.Context, Endpoint) error
}

EndpointListener accepts an Endpoint and should block until the endpoint's context is canceled or an error occurred while accepting.

type InboundTunnel

type InboundTunnel interface {
	connect.Tunnel
	SessionID() string
}

InboundTunnel is a tunnel with its session id.

type TunnelListener

type TunnelListener interface {
	AcceptTunnel(context.Context, InboundTunnel) error
}

TunnelListener accepts InboundTunnel.

type TunnelSession

type TunnelSession interface {
	connect.Tunnel
	Session() *connect.Session
}

TunnelSession is a tunnel with its session.

Directories

Path Synopsis
Package single combines connect.EndpointAcceptor and connect.TunnelAcceptor into Acceptor allowing to run WatchService and TunnelService in the same instance.
Package single combines connect.EndpointAcceptor and connect.TunnelAcceptor into Acceptor allowing to run WatchService and TunnelService in the same instance.

Jump to

Keyboard shortcuts

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