listeners

package
v0.0.0-...-080782a Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2014 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterListener

func RegisterListener(name string, creator CreateListener)

Types

type CommandStream

type CommandStream struct {
	Ch    chan *RemoteCommand
	ChErr chan error
	Fatal bool
	// contains filtered or unexported fields
}

func NewCommandStream

func NewCommandStream() *CommandStream

func (*CommandStream) AddListener

func (cs *CommandStream) AddListener(l RemoteListener) bool

func (*CommandStream) ClearError

func (cs *CommandStream) ClearError()

func (*CommandStream) Close

func (cs *CommandStream) Close()

func (*CommandStream) Count

func (cs *CommandStream) Count() int

func (*CommandStream) Error

func (cs *CommandStream) Error() error

func (*CommandStream) GetError

func (cs *CommandStream) GetError() error

func (*CommandStream) HasError

func (cs *CommandStream) HasError() bool

func (*CommandStream) Next

func (cs *CommandStream) Next(cmd *RemoteCommand) bool

type CreateListener

type CreateListener func(params map[string]string) (l Listener, ok bool)

type Listener

type Listener interface {
	RunListener(cs *CommandStream)
}

func GetListener

func GetListener(name string, params map[string]string) (l Listener, ok bool)

type RemoteCommand

type RemoteCommand struct {
	Code   string
	Repeat int
	Key    string
	Source string
	Time   time.Time
}

type RemoteListener

type RemoteListener interface {
	RunListener(cmd *CommandStream)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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