package
1.6.3
Repository: https://github.com/cea-hpc/sshproxy.git
Documentation: pkg.go.dev

# Functions

CalcSessionID returns a unique 10 hexadecimal characters string from a user name, time, ip address and port.
CanConnect tests if a connection to host:port can be made (with a 1s timeout).
CheckRoutes checks and replaces all hosts defined in a map of routes with their "host:port" value (in case the host is defined without a port).
GetGroupList returns a map of group memberships for the specified user.
GetGroups returns a map of group memberships for the current user.
GetGroupUser returns a map of group memberships for the specifised user.
IsDestinationInRoutes returns true if dest exists in routes, false otherwise.
IsRouteAlgorithm checks if the specified algo is valid.
IsRouteMode checks if the specified mode is valid.
LoadConfig load configuration file and adapt it according to specified user.
MustSetupLogging setups logging framework.
NewEtcdClient creates a new etcd client.
ParseDuration parses a YAML string into a Duration or returns an error.
Return slice of strings containing formatted configuration values.
SelectRoute returns a destination among the destinations according to the specified algo.
SplitHostPort splits a network address of the form "host:port" or "host[:port]" into host and port.

# Constants

DefaultService is the default service name.
DefaultSSHPort is the default SSH server port.
These are the possible states of an host: Up: host is up, Down: host is down, Disabled: host was disabled by an admin.
These are the possible states of an host: Up: host is up, Down: host is down, Disabled: host was disabled by an admin.
These are the possible states of an host: Up: host is up, Down: host is down, Disabled: host was disabled by an admin.
These are the possible states of an host: Up: host is up, Down: host is down, Disabled: host was disabled by an admin.

# Variables

DefaultAlgorithm is the default algorithm used to find a route if no other algorithm is specified in configuration.
DefaultMode is the default mode used to find a route if no other mode is specified in the configuration.
DefaultRouteKeyword is the keyword used to specify the default route.
ErrKeyNotFound is returned when key is not found in etcd.

# Structs

Bandwidth represents the amount of kB/s.
BasicHostChecker implements the HostChecker interface.
Client is a wrapper to easily do request to etcd cluster.
Config represents the configuration for sshproxy.
FlatConnection is a structure used to flatten a connection informations present in etcd.
FlatGroup is a structure used to flatten a group informations present in etcd.
FlatHost is a structure used to flatten a host informations present in etcd.
FlatUser is a structure used to flatten a user informations present in etcd.
Host represents the state of a host.
RouteConfig represents the configuration of a route.
TranslateCommandConfig represents the configuration of a translate_command.

# Interfaces

HostChecker is the interface that wraps the Check method.

# Type aliases

Duration is a type used in configuration file to unmarshal a duration from a YAML string.
State of a host.