github.com/orofarne/hammy@v0.0.0-20130409105742-374fadfd6ecb/src/hammy/cmd_buffer.go (about) 1 package hammy 2 3 // Command 4 type Cmd struct { 5 Cmd string 6 Options map[string]interface{} 7 } 8 9 // Commads queue from trigger 10 type CmdBuffer []Cmd 11 12 // Create new CmdBuffer 13 func NewCmdBuffer(size uint32) *CmdBuffer { 14 res := make(CmdBuffer, size) 15 return &res 16 } 17 18 // Iterface for command commiter 19 // Returns data for next processing stage or error 20 type CmdBufferProcessor interface { 21 Process(key string, cmdb *CmdBuffer) error 22 }