controller

package
v0.0.0-...-289dbc7 Latest Latest
Warning

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

Go to latest
Published: May 1, 2014 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandStart    CommandKey = "start"
	CommandShutdown            = "shutdown"
	CommandAdd                 = "add"
	CommandRemove              = "remove"
	CommandList                = "list"
)
View Source
const (
	CommandTargetMonitor   CommandTarget = "monitor"
	CommandTargetEmail                   = "email"
	CommandTargetLocations               = "locations"
	CommandTargetSites                   = "sites"
)
View Source
const (
	CommandOptionConfig            CommandOption = "config"
	CommandOptionPort                            = "port"
	CommandOptionTo                              = "to"
	CommandOptionFrom                            = "from"
	CommandOptionFor                             = "for"
	CommandOptionLocation                        = "location"
	CommandOptionSites                           = "sites"
	CommandOptionHighPrioritySites               = "hpsites"
)

Variables

This section is empty.

Functions

func ShutdownListenerOnPort

func ShutdownListenerOnPort(port int) error

Types

type CommandInfo

type CommandInfo struct {
	Command    CommandKey
	ConfigFile string
}

type CommandKey

type CommandKey string

func ResolveCommandKeyString

func ResolveCommandKeyString(key string) (CommandKey, error)

type CommandOption

type CommandOption string

func ResolveCommandOptionString

func ResolveCommandOptionString(key string) (CommandOption, error)

type CommandServer

type CommandServer struct {
	Port    int
	Timeout time.Time
	// contains filtered or unexported fields
}

func SetupNewListenerOnPort

func SetupNewListenerOnPort(port int) (*CommandServer, error)

func (*CommandServer) ShutdownListener

func (server *CommandServer) ShutdownListener()

func (*CommandServer) StartListener

func (server *CommandServer) StartListener() (err error)

func (*CommandServer) StartListenerInBackground

func (server *CommandServer) StartListenerInBackground() (err error)

func (*CommandServer) String

func (server *CommandServer) String() string

type CommandTarget

type CommandTarget string

func ResolveCommandTargetString

func ResolveCommandTargetString(key string) (CommandTarget, error)

type ControlCommand

type ControlCommand struct {
	Command     CommandKey
	Target      CommandTarget
	Options     map[CommandOption]string
	TargetValue string
}

Jump to

Keyboard shortcuts

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