Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a peer proxy service client using grpc and tls.
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
NewClient creats a new peer proxy client.
func (*Client) DialNode ¶
func (c *Client) DialNode( proxyIDs []string, nodeID string, src net.Addr, dst net.Addr, tunnelType types.TunnelType, ) (net.Conn, error)
DialNode dials a node through a peer proxy.
func (*Client) GetConnectionsCount ¶
type ClientConfig ¶
type ClientConfig struct { // Context is a signaling context Context context.Context // ID is the ID of this server proxy ID string // AuthClient is an auth client AuthClient auth.ClientI // AccessPoint is a caching auth client AccessPoint auth.ProxyAccessPoint // TLSConfig is the proxy client TLS configuration. TLSConfig *tls.Config // Log is the proxy client logger. Log logrus.FieldLogger // Clock is used to control connection monitoring ticker. Clock clockwork.Clock // GracefulShutdownTimout is used set the graceful shutdown // duration limit. GracefulShutdownTimeout time.Duration // ClusterName is the name of the cluster. ClusterName string // contains filtered or unexported fields }
ClientConfig configures a Client instance.
type ClusterDialer ¶
type ClusterDialer interface {
Dial(clusterName string, request DialParams) (net.Conn, error)
}
ClusterDialer dials a node in the given cluster.
type DialParams ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a proxy service server using grpc and tls.
func NewServer ¶
func NewServer(config ServerConfig) (*Server, error)
NewServer creates a new proxy server instance.
type ServerConfig ¶
type ServerConfig struct { AccessCache auth.AccessCache Listener net.Listener TLSConfig *tls.Config ClusterDialer ClusterDialer Log logrus.FieldLogger ClusterName string // contains filtered or unexported fields }
ServerConfig configures a Server instance.
Click to show internal directories.
Click to hide internal directories.