runner

package
v10.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnviron

func GetEnviron(variables ...string) []string

GetEnviron overrides and formats the env

func GetPathEnv

func GetPathEnv(binPath string) string

GetPathEnv handles the Path craziness

func SetEnv

func SetEnv(key, value string) string

SetEnv formats the env key / value pair

Types

type Client

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

Client defines the stucture of the client

func (*Client) IsRunning

func (client *Client) IsRunning() bool

IsRunning will return true if the connector is reported as running

func (*Client) Shutdown

func (client *Client) Shutdown() error

Shutdown will kill the connector process

func (*Client) Start

func (client *Client) Start() error

Start runs the connector

type Config

type Config struct {
	ServiceName    string
	DisplayName    string
	Description    string
	ConnectorName  string
	GithubSlug     string
	Tag            string
	BinPath        string
	Dir            string
	Stderr, Stdout string
}

Config is the runner connector config structure.

func GetConfig

func GetConfig() (*Config, error)

GetConfig get the service config

type Program

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

Program inteface that is real

func NewProgram

func NewProgram(config *Config) (*Program, error)

NewProgram creates a new program cient

func (*Program) Start

func (prg *Program) Start(_ service.Service) error

Start service but really

func (*Program) Stop

func (prg *Program) Stop(_ service.Service) error

Stop service but really

type Runner

type Runner interface {
	Start() error
	Shutdown() error
	IsRunning() bool
}

Runner defines the interface to run a Cmd

func New

func New(config *Config) Runner

New creates a new instance of runner

Jump to

Keyboard shortcuts

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