github.com/mit-dci/lit@v0.0.0-20221102210550-8c3d3b49f2ce/eventbus/event.go (about) 1 package eventbus 2 3 // An Event is a description of "something" that has taken place. 4 type Event interface { 5 Name() string 6 Flags() uint8 7 } 8 9 const ( 10 11 // EFLAG_NORMAL means this is a normal sync event. 12 EFLAG_NORMAL = 0 13 14 // EFLAG_UNCANCELLABLE means that the event cannot be cancelled. 15 EFLAG_UNCANCELLABLE = 1 << 0 16 17 // EFLAG_ASYNC_UNSAFE means that the event is an async event. Don't use declaritvely. 18 EFLAG_ASYNC_UNSAFE = 1 << 1 // Don't use this directly! 19 20 // EFLAG_ASYNC means thtat the event will be processed asychronously. 21 EFLAG_ASYNC = EFLAG_ASYNC_UNSAFE | EFLAG_UNCANCELLABLE 22 )