server

package
v0.0.0-...-110fdd2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInitiliazed    = fmt.Errorf("already initialized")
	ErrNotInitiliazed = fmt.Errorf("not  initialized")
)

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func WithAddr

func WithAddr(addr string) Option

func WithPort

func WithPort(port int) Option

func WithPrometheusAddr

func WithPrometheusAddr(addr string) Option

func WithPrometheusPort

func WithPrometheusPort(port int) Option

func WithSSHServerConfig

func WithSSHServerConfig(cfg *ssh.ServerConfig) Option

type Options

type Options struct {
	Addr            string
	Port            int
	PrometheusAddr  string
	PrometheusPort  int
	SSHServerConfig *ssh.ServerConfig
}

func (*Options) Apply

func (o *Options) Apply(options ...Option)

type Server

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

func New

func New() *Server

func (*Server) Initialize

func (s *Server) Initialize(options ...Option) error

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

Jump to

Keyboard shortcuts

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