package
1.0.0
Repository: https://github.com/obivan/teleport.git
Documentation: pkg.go.dev

# Functions

Consolef prints the same message to a 'ui console' (if defined) and also to the logger with INFO priority.
CreateTLSConfiguration sets up default TLS configuration.
CryptoRandomHex returns hex encoded random string generated with crypto-strong pseudo random generator of the given bytes.
FatalError is for CLI front-ends: it detects gravitational.Trace debugging information, sends it to the logger, strips it off and prints a clean message to stderr.
GenerateSelfSignedCert generates a self signed certificate that is valid for given domain names and ips, returns PEM-encoded bytes with key and cert.
GetFreeTCPPorts returns a lit of available ports on localhost used for testing.
GuessIP tries to guess an IP address this machine is reachable at on the internal network, always picking IPv4 from the internal address space If no internal IPs are found, it returns 127.0.0.1 but it never returns an address from the public IP space.
InitCLIParser configures kingpin command line args parser with some defaults common for all Teleport CLI tools.
InitLoggerCLI tools by default log into syslog, not stderr.
InitLoggerDebug configures the logger to dump everything to stderr.
InitLoggerForTests inits logger to discard ouput in tests unless TELEPORT_DEBUG is set to "true".
IsDir is a helper function to quickly check if a given path is a valid directory.
IsFile returns true if a given file path points to an existing file.
IsHandshakeFailedError specifies whether this error indicates failed handshake.
IsLocalhost returns true if this is a local hostname or ip.
IsLoopback returns 'true' if a given hostname resolves to local host's loopback interface.
IsShellFailedError specifies whether this error indicates failed attempt to start shell.
ListenTLS sets up TLS listener for the http handler, starts listening on a TCP socket and returns the socket which is ready to be used for http.Serve.
MultiCloser implements io.Close, it sequentially calls Close() on each object.
MustParseAddr parses the provided string into NetAddr or panics on an error.
No description provided by the author
NewCloseBroadcaster returns new instance of close broadcaster.
NewFileAddrStorage returns new instance of file-based address storage.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ParseAddr takes strings like "tcp://host:port/path" and returns *NetAddr or an error.
ParseHostPortAddr takes strings like "host:port" and returns *NetAddr or an error If defaultPort == -1 it expects 'hostport' string to have it.
PrintVersion prints human readable version.
RandomDuration returns a duration in a range [0, max).
ReadAll is similarl to ioutil.ReadAll, except it doesn't use ever-increasing internal buffer, instead asking for the exact buffer size.
ReadHostUUID reads host UUID from the file in the data dir.
ReadOrMakeHostUUID looks for a hostid file in the data dir.
No description provided by the author
ReplaceLocalhost checks if a given address is link-local (like 0.0.0.0 or 127.0.0.1) and replaces it with the IP taken from replaceWith, preserving the original port Both addresses are in "host:port" format The function returns the original value if it encounters any problems with parsing.
No description provided by the author
No description provided by the author
UserMessageFromError returns user friendly error message from error.
WriteHostUUID writes host UUID into a file.

# Constants

CertExtensionAuthority specifies teleport authority's name that signed this domain.
CertExtensionRole specifies teleport role.
CertTeleportUser specifies teleport user.
DefaultCertTTL sets the TTL of the self-signed certificate (1 year).
DefaultLRUCapacity is a capacity for LRU session cache.
HostUUIDFile is the file name where the host UUID file is stored.
No description provided by the author
No description provided by the author

# Structs

CloseBroadcaster is a helper struct that implements io.Closer and uses channel to broadcast it's closed state once called.
FileAddrStorage is a file based address storage.
No description provided by the author
NetAddr is network address that includes network, optional path and host port.
PipeNetConn implemetns net.Conn from io.Reader,io.Writer and io.Closer.
TLSCredentials keeps the typical 3 components of a proper HTTPS configuration.
WebSockWrapper wraps the raw websocket and converts Write() calls to proper websocket.Send() working in binary or text mode.

# Interfaces

AddrStorage is used to store information locally for every client that connects in the cluster, so it can always have up-to-date info about auth servers.

# Type aliases

No description provided by the author
NetAddrList is a list of NetAddrs that supports helper methods for parsing from CLI tools.
NetAddrVal can be used with flag package.
PortList is a list of TCP port.
WebSocketMode allows to create WebSocket wrappers working in text or binary mode.