Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RemoteClusterGetter ¶
type RemoteClusterGetter interface { // GetRemoteCluster returns a remote cluster by name GetRemoteCluster(clusterName string) (types.RemoteCluster, error) }
RemoteClusterGetter provides access to remote cluster resources
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is used by the proxy to establish connections to both nodes and other clusters.
func NewRouter ¶
func NewRouter(cfg RouterConfig) (*Router, error)
NewRouter creates and returns a Router that is populated from the provided RouterConfig.
func (*Router) DialHost ¶
func (r *Router) DialHost(ctx context.Context, from net.Addr, host, port, clusterName string, accessChecker services.AccessChecker, agentGetter teleagent.Getter) (net.Conn, error)
DialHost dials the node that matches the provided host, port and cluster. If no matching node is found an error is returned. If more than one matching node is found and the cluster networking configuration is not set to route to the most recent an error is returned.
type RouterConfig ¶
type RouterConfig struct { // ClusterName indicates which cluster the router is for ClusterName string // Log is the logger to use Log *logrus.Entry // AccessPoint is the proxy cache RemoteClusterGetter RemoteClusterGetter // SiteGetter allows looking up sites SiteGetter SiteGetter // TracerProvider allows tracers to be created TracerProvider oteltrace.TracerProvider // contains filtered or unexported fields }
RouterConfig contains all the dependencies required by the Router
func (*RouterConfig) CheckAndSetDefaults ¶
func (c *RouterConfig) CheckAndSetDefaults() error
CheckAndSetDefaults ensures the required items were populated
type SiteGetter ¶
type SiteGetter interface { // GetSite returns the site matching the provided clusterName GetSite(clusterName string) (reversetunnel.RemoteSite, error) }
SiteGetter provides access to connected local or remote sites