manager

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2016 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug  bool         `toml:"debug"`
	Server ServerConfig `toml:"server"`
	Files  FileConfig   `toml:"files"`
}

A Config is the top-level toml-serializaible config struct

func LoadConfig

func LoadConfig(cfgFile string, c *cli.Context) (*Config, error)

type FileConfig

type FileConfig struct {
	StatusFile string `toml:"status_file"`
	DBFile     string `toml:"db_file"`
	DBType     string `toml:"db_type"`
	// used to connect to worker
	CACert string `toml:"ca_cert"`
}

A FileConfig contains paths to special files

type Manager

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

A Manager represents a manager server

func GetTUNASyncManager

func GetTUNASyncManager(cfg *Config) *Manager

GetTUNASyncManager returns the manager from config

func (*Manager) Run

func (s *Manager) Run()

Run runs the manager server forever

type ServerConfig

type ServerConfig struct {
	Addr    string `toml:"addr"`
	Port    int    `toml:"port"`
	SSLCert string `toml:"ssl_cert"`
	SSLKey  string `toml:"ssl_key"`
}

A ServerConfig represents the configuration for HTTP server

Jump to

Keyboard shortcuts

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