Documentation

Index

Constants

View Source
const (
	ProgramBinPath     = "/var/lib/baetyl/bin"
	ProgramEntryYaml   = "program.yml" // in program package to specify entry
	ProgramServiceYaml = "service.yml"
)

Variables

This section is empty.

Functions

func Run

func Run() error

Types

type Config

type Config struct {
	Name        string `yaml:"name" json:"name" validate:"nonzero"`
	DisplayName string `yaml:"displayName" json:"displayName"`
	Description string `yaml:"description" json:"description"`

	Dir  string   `yaml:"dir" json:"dir"`
	Exec string   `yaml:"exec" json:"exec"`
	Args []string `yaml:"args" json:"args"`
	Env  []string `yaml:"env" json:"env"`

	Logger log.Config `yaml:"logger" json:"logger"`
}

    Config is the program config.

    type Entry

    type Entry struct {
    	Entry string `yaml:"entry" json:"entry" validate:"nonzero"`
    }

    type Program

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

    func (*Program) Start

    func (p *Program) Start(s service.Service) error

    func (*Program) Stop

    func (p *Program) Stop(s service.Service) error