application

package
v0.0.0-...-57fc2aa Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

An application handles the running, updating, and archiving of a user's software. Each application folder has this structure:

myapplication     # A top-level directory, conceptually an "Application"
└── archive       # Old releases
└── current
    └── foo.exe   # Exactly one executable file
    └── any.txt   # Other resources for foo.exe, ignored by gexe
    └── any.dat
└── release       # Contents of a new release
└── command       # Files that appear here are interpreted as commands to gexe

func NewApplication

func NewApplication(dir string) (*Application, error)

Construct a new Application based on the given directory (see godoc for Application struct).

func (*Application) BinaryPath

func (app *Application) BinaryPath() string

Get the path (on local disk) of this application's binary.

func (*Application) Loop

func (app *Application) Loop()

Main control flow for an active application. The only way to leave this loop is if the program is terminated by the OS.

func (*Application) Name

func (app *Application) Name() string

Get the human friendly name for this application.

type Daemon

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

func NewDaemon

func NewDaemon(binary string) *Daemon

func (*Daemon) Kill

func (daemon *Daemon) Kill()

func (*Daemon) Loop

func (daemon *Daemon) Loop() chan bool

Main activity loop for a daemon. Returns a channel to wait on when Kill() is called.

func (*Daemon) Start

func (daemon *Daemon) Start()

func (*Daemon) Stop

func (daemon *Daemon) Stop()

Jump to

Keyboard shortcuts

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