Documentation ¶
Index ¶
- Constants
- Variables
- func GetTime() time.Time
- type Action
- type BeforeSleepProc
- type Event
- type EventFinalizerProc
- type EventLoop
- func (el *EventLoop) CreateFileEvent(fd int, mask Action, proc FileProc, clientData interface{}) error
- func (el *EventLoop) CreateTimeEvent(milliseconds time.Duration, proc TimeProc, clientData interface{}, ...)
- func (el *EventLoop) Delete()
- func (el *EventLoop) DeleteFileEvent(fd int, mask Action)
- func (el *EventLoop) DeleteTimeEvent(id int) error
- func (el *EventLoop) GetApiName() string
- func (el *EventLoop) GetFileEvents(fd int) Action
- func (el *EventLoop) GetSetSize() int
- func (el *EventLoop) Main()
- func (el *EventLoop) ProcessEvents(flags Event) int
- func (el *EventLoop) ProcessTimeEvents() int
- func (el *EventLoop) Resize(setSize int) error
- func (el *EventLoop) SetAfterSleepProc(afterSleep BeforeSleepProc)
- func (el *EventLoop) SetBeforeSleepProc(beforeSleep BeforeSleepProc)
- func (el *EventLoop) SetDontWait(noWait bool)
- func (el *EventLoop) Stop()
- type FileEvent
- type FileProc
- type FiredEvent
- type IDType
- type TimeEvent
- type TimeProc
Constants ¶
View Source
const ( NONE Action = 0 READABLE = 1 WRITABLE = 2 BARRIER = 4 )
View Source
const ( NOMORE = -1 DELETED_EVENT_ID = -1 )
Variables ¶
View Source
var ( OK = errors.New("OK") ERR = errors.New("ERR") )
Functions ¶
Types ¶
type BeforeSleepProc ¶
type BeforeSleepProc func(eventLoop *EventLoop)
type Event ¶
type Event int8
const ( FILE_EVENTS Event = 1 << iota TIME_EVENTS DONT_WAIT CALL_BEFORE_SLEEP CALL_AFTER_SLEEP ALL_EVENTS = (FILE_EVENTS | TIME_EVENTS) )
type EventFinalizerProc ¶
type EventFinalizerProc func(eventLoop *EventLoop, clientData interface{})
type EventLoop ¶
type EventLoop struct {
// contains filtered or unexported fields
}
func (*EventLoop) CreateFileEvent ¶
func (*EventLoop) CreateTimeEvent ¶
func (el *EventLoop) CreateTimeEvent(milliseconds time.Duration, proc TimeProc, clientData interface{}, finalizerProc EventFinalizerProc)
func (*EventLoop) DeleteFileEvent ¶
func (*EventLoop) DeleteTimeEvent ¶
func (*EventLoop) GetApiName ¶
func (*EventLoop) GetFileEvents ¶
func (*EventLoop) GetSetSize ¶
func (*EventLoop) ProcessEvents ¶
func (*EventLoop) ProcessTimeEvents ¶
func (*EventLoop) SetAfterSleepProc ¶
func (el *EventLoop) SetAfterSleepProc(afterSleep BeforeSleepProc)
func (*EventLoop) SetBeforeSleepProc ¶
func (el *EventLoop) SetBeforeSleepProc(beforeSleep BeforeSleepProc)
func (*EventLoop) SetDontWait ¶
type FiredEvent ¶
type FiredEvent struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.