Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: c7e34ff426
Fetching contributors…

Cannot retrieve contributors at this time

59 lines (46 sloc) 0.868 kB
package sylvester
var (
Messages = map[string][]byte{
"START": {0, 0},
"EXIT": {0, 1},
"PING": {0, 2},
"PONG": {0, 3},
"NEXT": {0, 4},
"SYNCRESTART": {0, 5},
}
)
// Convenient Access for Message Acess
func NodeStart() []byte {
return Messages["START"]
}
func NodeExit() []byte {
return Messages["EXIT"]
}
func NodePing() []byte {
return Messages["PING"]
}
func NodePong() []byte {
return Messages["PONG"]
}
func NodeNext() []byte {
return Messages["NEXT"]
}
func NodeSyncEventRestart() []byte {
return Messages["SYNCRESTART"]
}
// Functions for Channels
func (p ControlChan) Start() {
p <- Messages["START"]
}
func (p ControlChan) Exit() {
p <- Messages["EXIT"]
}
func (p ControlChan) Ping() {
p <- Messages["PING"]
}
func (p ControlChan) Pong() {
p <- Messages["PONG"]
}
func (p ControlChan) Next() {
p <- Messages["NEXT"]
}
Jump to Line
Something went wrong with that request. Please try again.