Documentation
¶
Overview ¶
Requests are sent through channels for communication. It works like a mail system, every routine shares a channel which is regarded by themselves as a outport and they send out their requests for routines outside through it. And every routine holds a channel from where they receive outside requests. Thus a mail routine(usually main routine) is required to listen to the shared channel and dispatch requests there to their destination.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Destination ¶
type Destination int
const ( PANEL Destination = iota PLAYER MAIN // main routine )
type Request ¶
type Request struct { Req RequestType Destination Destination Attachments interface{} }
func NewRequestToMain ¶
func NewRequestToMain(req RequestType, attachments interface{}) Request
func NewRequestToPanel ¶
func NewRequestToPanel(req RequestType) Request
func NewRequestToPlayer ¶
func NewRequestToPlayer(req RequestType) Request
type RequestType ¶
type RequestType int
const ( // request sent to player RequestRandomMode RequestType = iota RequestRepeatMode RequestSequentialMode RequestNextTrack RequestPrevTrack RequestStop // request sent to panel RequestShowLOGO RequestClearAndStop // request sent to main routine RequestSetNewLibrary )
Click to show internal directories.
Click to hide internal directories.