mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-17 14:09:44 +02:00
feat: add event emission for blocked requests and provider changes
- Emit ACL blocked events with matched rule information - Emit HTTP blocked events from CIDR whitelist, ForwardAuth, and OIDC middlewares - Emit global events for provider file/docker changes - Add MatchedIndex method to ACL matchers for rule identification - Update goutils submodule for events package update
This commit is contained in:
@@ -65,12 +65,22 @@ var fileActionNameMap = map[Action]string{
|
||||
ActionFileRenamed: "renamed",
|
||||
}
|
||||
|
||||
var dockerActionNameMap = map[Action]string{
|
||||
ActionContainerCreate: "created",
|
||||
ActionContainerStart: "started",
|
||||
ActionContainerUnpause: "unpaused",
|
||||
ActionContainerKill: "killed",
|
||||
ActionContainerStop: "stopped",
|
||||
ActionContainerPause: "paused",
|
||||
ActionContainerDie: "died",
|
||||
ActionContainerDestroy: "destroyed",
|
||||
}
|
||||
|
||||
var actionNameMap = func() (m map[Action]string) {
|
||||
m = make(map[Action]string, len(DockerEventMap))
|
||||
for k, v := range DockerEventMap {
|
||||
m[v] = string(k)
|
||||
}
|
||||
m = make(map[Action]string, len(fileActionNameMap)+len(dockerActionNameMap)+1)
|
||||
maps.Copy(m, fileActionNameMap)
|
||||
maps.Copy(m, dockerActionNameMap)
|
||||
m[ActionForceReload] = "force-reloaded"
|
||||
return m
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user