···3939 SlackWebhookURL string
4040}
41414242+// Entrypoint for external code pushing arbitrary identity events in to the engine.
4343+//
4444+// This method can be called concurrently, though cached state may end up inconsistent if multiple events for the same account (DID) are processed in parallel.
4245func (eng *Engine) ProcessIdentityEvent(ctx context.Context, typ string, did syntax.DID) error {
4346 // similar to an HTTP server, we want to recover any panics from rule execution
4447 defer func() {
···7679 return nil
7780}
78818282+// Entrypoint for external code pushing repository updates. A simple repo commit results in multiple calls.
8383+//
8484+// This method can be called concurrently, though cached state may end up inconsistent if multiple events for the same account (DID) are processed in parallel.
7985func (eng *Engine) ProcessRecordOp(ctx context.Context, op RecordOp) error {
8086 // similar to an HTTP server, we want to recover any panics from rule execution
8187 defer func() {
···129135 return nil
130136}
131137132132-func (e *Engine) GetCount(name, val, period string) (int, error) {
133133- return e.Counters.GetCount(context.TODO(), name, val, period)
134134-}
135135-136136-func (e *Engine) GetCountDistinct(name, bucket, period string) (int, error) {
137137- return e.Counters.GetCountDistinct(context.TODO(), name, bucket, period)
138138-}
139139-140140-// checks if `val` is an element of set `name`
141141-func (e *Engine) InSet(name, val string) (bool, error) {
142142- return e.Sets.InSet(context.TODO(), name, val)
143143-}
144144-145145-// purge caches of any exiting metadata
138138+// Purge metadata caches for a specific account.
146139func (e *Engine) PurgeAccountCaches(ctx context.Context, did syntax.DID) error {
147140 e.Directory.Purge(ctx, did.AtIdentifier())
148141 return e.Cache.Purge(ctx, "acct", did.String())