Example #1
0
func resourceIDLocker(event *Event) locks.Locker {
	if event.ResourceID == "" {
		return locks.NopLocker()
	}
	key := fmt.Sprintf("%s:%s", event.ResourceType, event.ResourceID)
	return locks.KeyLocker(key)
}
Example #2
0
func nopLocker(_ *Event) locks.Locker { return locks.NopLocker() }