installer

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Binaries = iota
	SourceCode
)

Variables

This section is empty.

Functions

func CreateDirAsUser added in v0.0.2

func CreateDirAsUser(directory string, username string)

func CreateUser added in v0.0.2

func CreateUser(username string)

func Prepare added in v0.0.2

func Prepare() error

func Run

func Run(head string, parts ...string) (string, error)

Types

type Config

type Config struct {
	Daemons []*Daemon `json:"daemons"`
}

func (*Config) CreateConfig added in v0.0.2

func (c *Config) CreateConfig()

func (*Config) GenerateDefault

func (c *Config) GenerateDefault() error

func (*Config) GetAutostartingNodes

func (c *Config) GetAutostartingNodes() []*Daemon

func (*Config) GetConfigForNode

func (c *Config) GetConfigForNode(name string) *Daemon

func (*Config) ReadConfigFromFile

func (c *Config) ReadConfigFromFile(filepath string) error

func (*Config) SaveToFile

func (c *Config) SaveToFile(filepath string) error

func (*Config) Start added in v0.0.2

func (c *Config) Start(what string)

type Daemon

type Daemon struct {
	Name      string `json:"name"`
	Config    string `json:"config"`
	Autostart bool   `json:"autostart"`
}

type InstallSource added in v0.0.2

type InstallSource uint8

type Installer

type Installer interface {
	Prepare() error
	Install(...string)
	Update(...string)
}

func New added in v0.0.2

func New(s InstallSource) (Installer, error)

type PidFile

type PidFile string

func (*PidFile) Read

func (f *PidFile) Read() int

Read the pidfile.

func (*PidFile) String

func (f *PidFile) String() string

type Process

type Process struct {
	Name    string
	Command string
	Args    []string
	Pidfile PidFile
	ConfDir string
	Pid     int
	Status  *ProcessStatus
	// contains filtered or unexported fields
}

func NewProcess

func NewProcess(name, configDir string) *Process

func (*Process) Start

func (p *Process) Start()

func (*Process) Stop

func (p *Process) Stop()

type ProcessStatus

type ProcessStatus struct {
	Running bool
	CPU     string
	Memory  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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