- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for rulesMap (0.08 sec)
-
internal/event/rulesmap.go
rulesMap[eventName] = rules.Union(rulesMap[eventName]) } } // Remove - removes given rules map. func (rulesMap RulesMap) Remove(rulesMap2 RulesMap) { for eventName, rules := range rulesMap { if nr := rules.Difference(rulesMap2[eventName]); len(nr) != 0 { rulesMap[eventName] = nr } else { delete(rulesMap, eventName) } } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 2.6K bytes - Viewed (0) -
cmd/event-notification.go
func (evnot *EventNotifier) AddRulesMap(bucketName string, rulesMap event.RulesMap) { evnot.Lock() defer evnot.Unlock() rulesMap = rulesMap.Clone() // Do not add for an empty rulesMap. if len(rulesMap) == 0 { delete(evnot.bucketRulesMap, bucketName) } else { evnot.bucketRulesMap[bucketName] = rulesMap } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 21 22:22:24 UTC 2024 - 7.7K bytes - Viewed (0) -
internal/event/rulesmap_test.go
rulesMap RulesMap rulesMapToAdd RulesMap expectedResult RulesMap }{ {rulesMapCase1, rulesMapToAddCase1, expectedResultCase1}, {rulesMapCase2, rulesMapToAddCase2, expectedResultCase2}, {rulesMapCase3, rulesMapToAddCase3, expectedResultCase3}, } for i, testCase := range testCases { testCase.rulesMap.Remove(testCase.rulesMapToAdd) if !reflect.DeepEqual(testCase.rulesMap, testCase.expectedResult) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jan 05 18:43:06 UTC 2024 - 6.8K bytes - Viewed (0) -
internal/event/config.go
conf.QueueList[i].SetRegion(region) } } // ToRulesMap - converts all queue configuration to RulesMap. func (conf *Config) ToRulesMap() RulesMap { rulesMap := make(RulesMap) for _, queue := range conf.QueueList { rulesMap.Add(queue.ToRulesMap()) } return rulesMap } // ParseConfig - parses data in reader to notification configuration.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 16 17:28:29 UTC 2021 - 8.4K bytes - Viewed (0) -
cmd/bucket-notification-handlers.go
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } rulesMap := config.ToRulesMap() globalEventNotifier.AddRulesMap(bucketName, rulesMap) writeSuccessResponseHeadersOnly(w)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.1K bytes - Viewed (0) -
cmd/listen-notification-handlers.go
} if bucketName != "" { if _, err := objAPI.GetBucketInfo(ctx, bucketName, BucketOptions{}); err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } } rulesMap := event.NewRulesMap(eventNames, pattern, event.TargetID{ID: mustGetUUID()}) setEventStreamHeaders(w) // Listen Publisher and peer-listen-client uses nonblocking send and hence does not wait for slow receivers.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 6K bytes - Viewed (0)