Initial copy in

This commit is contained in:
Ian Gulliver
2023-06-12 20:03:17 -07:00
parent d832ab35c7
commit 6ff8003f69
8 changed files with 368 additions and 8 deletions

18
rateclass.go Normal file
View File

@@ -0,0 +1,18 @@
package event
type rateClass struct {
grantRate float64
criteria map[string]any
eventRate float64
}
func (rc *rateClass) match(ev *Event) bool {
for k, v := range rc.criteria {
if ev.Data[k] != v {
return false
}
}
return true
}