Categorygithub.com/containerssh/backend/v2
modulepackage
2.0.2
Repository: https://github.com/containerssh/backend.git
Documentation: pkg.go.dev

# README

ContainerSSH - Launch Containers on Demand

ContainerSSH Backend Library

Go Report Card LGTM Alerts

This library handles SSH requests and routes them to a container or other backends.

⚠⚠⚠ Warning: This is a developer documentation. ⚠⚠⚠
The user documentation for ContainerSSH is located at containerssh.io.

Using this library

This library can be used in conjunction with the sshserver to route SSH connections to containers.

You can create a new backend handler like this:

handler, err := backend.New(
    config,
    logger,
    loggerFactory,
    authBehavior,
)

This method accepts the following parameters:

config : The AppConfig struct from the configuration library. This is needed because this library performs a call to the config server if configured to fetch a connection-specific information.

logger : This variable is a logger from the log library.

loggerFactory : This is a logger factory used by the backend to create a logger for the instantiated backends after fetching the connection-specific configuration.

authBehavior : This variable can contain one of sshserver.AuthResponseSuccess, sshserver.AuthResponseFailure, or sshserver.AuthResponseUnavailable to indicate how the backend should react to authenticatio requests. Normally, this can be set to sshserver.AuthResponseUnavailable since the auth integration library will take care of the authentication.

The handler can be passed to the sshserver or to another overlay as a backend, for example auth integration.

# Functions

New creates a new backend handler.goland:noinspection GoUnusedExportedFunction.

# Constants

No description provided by the author
MetricHelpBackendError is the help text of backend errors.
MetricHelpBackendError is the help text of backend errors.
MetricLabelBackend is the name for the backend label.
MetricNameBackendError is the number of errors in the backend.
MetricNameBackendError is the number of errors in the backend.
MetricUnitBackendError is the unit of backend errors.
MetricUnitBackendError is the unit of backend errors.