src

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOG_PATH string
View Source
var MODES = map[string]bool{
	"run":    true,
	"build":  true,
	"update": true,
}

Functions

func AddFromFile

func AddFromFile(file []byte, workdir string) error

func StartProcess

func StartProcess(command string, args []string, name, logFile, workdir string, script bool) (pid int, err error)

StartProcess starts a process with given

Types

type Command

type Command struct {
	Command string `yaml:"command" gorm:"column:command"`
	Type    string `yaml:"type" gorm:"column:type"`
}

type Config

type Config struct {
	Name    string  `yaml:"name" gorm:"primaryKey"`
	Update  Command `yaml:"update" gorm:"embedded;embeddedPrefix:update_"`
	Build   Command `yaml:"build" gorm:"embedded;embeddedPrefix:build_"`
	Run     Command `yaml:"run" gorm:"embedded;embeddedPrefix:run_"`
	Workdir string  `yaml:"-" gorm:"column:workdir"` // Not set by user though
}

func Parser

func Parser(file []byte) (Config, error)

func SearchConfig

func SearchConfig(configName string) (Config, error)

func (*Config) Delete

func (c *Config) Delete() error

func (*Config) Restart

func (c *Config) Restart()

func (*Config) Start

func (c *Config) Start(mode string) error

func (*Config) Stop

func (c *Config) Stop()

Jump to

Keyboard shortcuts

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