Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DemoSignal1 ¶
DemoSignal1 illustrates a standard untyped signal.
func NewDemoSignal1 ¶
func NewDemoSignal1() *DemoSignal1
NewDemoSignal1 creates a new instance of DemoSignal1 for signal handling.
func (*DemoSignal1) Connect ¶
func (s *DemoSignal1) Connect(fn func(string))
func (*DemoSignal1) Disconnect ¶
func (s *DemoSignal1) Disconnect(key int64) (ok bool)
func (*DemoSignal1) OnDisconnect ¶
func (s *DemoSignal1) OnDisconnect(key int64, fn func())
func (*DemoSignal1) Send ¶
func (s *DemoSignal1) Send(fn func(func(string)))
Send data to all listeners registered to the signal.
func (*DemoSignal1) WithDisconnector ¶
func (s *DemoSignal1) WithDisconnector(fn func(string)) int64
type DemoSignal2 ¶
DemoSignal2 illustrates a typed signal.
func (*DemoSignal2) Connect ¶
func (s *DemoSignal2) Connect(fn DemoSignal2Func)
func (*DemoSignal2) Disconnect ¶
func (s *DemoSignal2) Disconnect(key int64) (ok bool)
func (*DemoSignal2) OnDisconnect ¶
func (s *DemoSignal2) OnDisconnect(key int64, fn func())
func (*DemoSignal2) Send ¶
func (s *DemoSignal2) Send(fn func(DemoSignal2Func))
Send data to all listeners registered to the signal.
func (*DemoSignal2) WithDisconnector ¶
func (s *DemoSignal2) WithDisconnector(fn DemoSignal2Func) int64
type DemoSignal2Func ¶
DemoSignal2Func is the auto-generated type for DemoSignal2.
All .Connect() calls internally cast functions to this type.
type DemoSignal3 ¶
DemoSignal3 illustrates a signal with a return value.
func NewDemoSignal3 ¶
func NewDemoSignal3() *DemoSignal3
NewDemoSignal3 creates a new instance of DemoSignal3 for signal handling.
func (*DemoSignal3) Connect ¶
func (s *DemoSignal3) Connect(fn func(string) string)
func (*DemoSignal3) Disconnect ¶
func (s *DemoSignal3) Disconnect(key int64) (ok bool)
func (*DemoSignal3) OnDisconnect ¶
func (s *DemoSignal3) OnDisconnect(key int64, fn func())
func (*DemoSignal3) Send ¶
func (s *DemoSignal3) Send(fn func(func(string) string))
Send data to all listeners registered to the signal.
func (*DemoSignal3) WithDisconnector ¶
func (s *DemoSignal3) WithDisconnector(fn func(string) string) int64
type DemoSignal4Func ¶
type DemoSignal4Func func(int)
DemoSignal4Func is the auto-generated type for DemoSignal4.
All .Connect() calls internally cast functions to this type.