plalib

package module
v0.0.0-...-102c0df Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2016 License: MIT Imports: 8 Imported by: 0

README

Pla-RPC

The base library for Pla-based applications. Such as Pla-RPC

Testing

$ go test

Change log

Please see CHANGELOG for more information what has changed recently.

Credits

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindTargetByTargetName

func FindTargetByTargetName(targetName string, targets []Target) (Target, *PlaError)

func RegisterLogger

func RegisterLogger(logger *logging.Logger)

Types

type Command

type Command struct {
	Command string
}

func (Command) Run

func (c Command) Run(params []string, stopRunning bool) bool

type PlaError

type PlaError struct {
	Error error
	Code  PlaErrorCode
}

func RunTargetByName

func RunTargetByName(targetName string, targets []Target, stopRunning bool, params []string) *PlaError

type PlaErrorCode

type PlaErrorCode int
const (
	TARGET_RUN_ERROR PlaErrorCode = 1 + iota
	TARGET_NOT_FOUND
	PLAFILE_NOT_READABLE
)

type Runnable

type Runnable interface {
	Run(params []string, stopRunning bool) bool
}

type Target

type Target struct {
	Name       string
	Commands   []Runnable
	Parameters []string
}

func LoadTargets

func LoadTargets(filename string) ([]Target, error)

func (Target) Run

func (t Target) Run(params []string, stopRunning bool) bool

Jump to

Keyboard shortcuts

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