server

package
v0.0.0-...-7655be8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 5 * time.Second
	DefaultRetries = 3
)

Variables

View Source
var PassageConfigValidTypes = map[string]bool{"tcp": true, "container": true}

Functions

This section is empty.

Types

type Config

type Config struct {
	Servers map[string]*SSHServerConfig
}

func (*Config) Marshal

func (c *Config) Marshal() ([]byte, error)

func (*Config) Unmarshal

func (c *Config) Unmarshal(in []byte) error

func (*Config) Validate

func (c *Config) Validate() error

type ConfigError

type ConfigError struct {
	Errors []error
}

func (*ConfigError) Error

func (err *ConfigError) Error() string

type PassageConfig

type PassageConfig struct {
	Type      string `default:"tcp"`
	Address   string
	Container string
	Port      string
	Local     string `default:"127.0.0.1:0"`
}

type RPCContainer

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

func (*RPCContainer) Addr

func (r *RPCContainer) Addr(passage string, reply *string) error

type RPCServer

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

func NewRPCServer

func NewRPCServer(s *Server) *RPCServer

func (*RPCServer) Close

func (r *RPCServer) Close() error

func (*RPCServer) Listen

func (r *RPCServer) Listen(a net.Addr) error

type SSHServerConfig

type SSHServerConfig struct {
	User     string
	Timeout  time.Duration
	Address  string
	Retries  int
	Passages map[string]*PassageConfig
}

type Server

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

func NewServer

func NewServer() *Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) Load

func (s *Server) Load(c *Config) error

func (*Server) String

func (s *Server) String() string

Jump to

Keyboard shortcuts

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