nvnamsss / streetlity-api

api server
0 stars 0 forks source link

Event in Go #5

Closed nvnamsss closed 4 years ago

nvnamsss commented 4 years ago

Need a module for event-drivent pattern in Go.

nvnamsss commented 4 years ago

Event is designing as a struct, the basic Event has a list of callback and a variable determine the style of trigger

type Event struct {
    Async     bool
    callbacks map[string]func()
}

Methods: