var ongoingEvents … var ongoingEventsMu … func SetEventFlag(srv common.ChatServer, flag string) { … } func SetEventFlagForDuration(srv common.ChatServer, flag string, duration time.Duration) { … } func IsFlagSet(srv common.ChatServer, flag string) bool { … } func UnsetEventFlag(srv common.ChatServer, flag string) { … } func WaitForEventFlag(flag string, timeout time.Duration) bool { … }