server

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDecoderOptions

func ConfigDecoderOptions(config *mapstructure.DecoderConfig)

ConfigDecoderOptions enables necessary mapstructure decode hook functions

Types

type Config

type Config struct {
	LogLevel log.Level `mapstructure:"log_level"`

	IAM struct {
		URL           string
		Token         string
		TokenFile     string        `mapstructure:"token_file"`
		AllowInsecure bool          `mapstructure:"allow_insecure"`
		LoginValidity time.Duration `mapstructure:"login_validity"`
	}

	SSH struct {
		ListenAddress string `mapstructure:"listen_address"`

		HostKeys     []ssh.Signer `mapstructure:"host_keys"`
		HostKeyFiles []string     `mapstructure:"host_key_files"`
	}

	Jail util.JailConfig
}

Config represents shhd's config

func (*Config) ReadSecrets

func (c *Config) ReadSecrets() error

ReadSecrets loads values for secret config options from files

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the shhd server

func NewServer

func NewServer(c Config) *Server

NewServer creates a new shhd server

func (*Server) Start

func (s *Server) Start() error

Start starts the shhd server

func (*Server) Stop

func (s *Server) Stop() error

Stop shuts down the shhd server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL