cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppManifest

type AppManifest struct {
	App *app.App
	// contains filtered or unexported fields
}

func (*AppManifest) Execute

func (a *AppManifest) Execute()

construct the app based on its manifest

type Command

type Command struct {
	Execute func()
}

func NewAppManifest

func NewAppManifest(a *app.App, data []byte) (*Command, error)

func NewGeneralFailure

func NewGeneralFailure(a *app.App, recieved string, message string) *Command

func NewMsgBroadcast

func NewMsgBroadcast(a *app.App, data []byte) (*Command, error)

func NewMsgQuery

func NewMsgQuery(a *app.App, data []byte) (*Command, error)

func NewMsgQueryFail

func NewMsgQueryFail(a *app.App, data []byte) (*Command, error)

func NewMsgQuerySuccess

func NewMsgQuerySuccess(a *app.App, data []byte) (*Command, error)

func NewStatusChange

func NewStatusChange(a *app.App, status int, data []byte) (*Command, error)

func ParseCommand

func ParseCommand(a *app.App, blob []byte) *Command

Parse a command given the command blob (verb and body, no message length)

type GeneralFailure

type GeneralFailure struct {
	App      *app.App
	Recieved string
	Message  string
}

func (*GeneralFailure) Execute

func (gf *GeneralFailure) Execute()

type MsgBroadcast

type MsgBroadcast struct {
	App     *app.App
	Id      string
	Content interface{}
}

func (*MsgBroadcast) Execute

func (mb *MsgBroadcast) Execute()

type MsgQuery

type MsgQuery struct {
	App         *app.App
	Id          string
	Capability  *app.Capability
	Action      string
	Data        interface{}
	InstanceIds []string
	Priority    int
}

func (*MsgQuery) Execute

func (mq *MsgQuery) Execute()

send this message query to all targeted apps

type MsgQueryFail

type MsgQueryFail struct {
	App     *app.App
	Id      string
	Message string
}

func (*MsgQueryFail) Execute

func (mqf *MsgQueryFail) Execute()

type MsgQuerySuccess

type MsgQuerySuccess struct {
	App *app.App
	Id  string
	Ret interface{}
}

func (*MsgQuerySuccess) Execute

func (mqs *MsgQuerySuccess) Execute()

type StatusChange

type StatusChange struct {
	App       *app.App
	NewStatus int
	Priority  int
}

func (*StatusChange) Execute

func (sc *StatusChange) Execute()

change the app's status and notify all those that depend on this app

Jump to

Keyboard shortcuts

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