2019-05-10 00:05:21 -07:00
|
|
|
package event
|
|
|
|
|
|
|
|
const eventSource = "policy-controller"
|
|
|
|
|
|
|
|
const eventWorkQueueName = "policy-controller-events"
|
|
|
|
|
|
|
|
const eventWorkerThreadCount = 1
|
2019-05-10 10:38:38 -07:00
|
|
|
|
2019-05-10 12:36:55 -07:00
|
|
|
//Info defines the event details
|
|
|
|
type Info struct {
|
2019-05-10 10:38:38 -07:00
|
|
|
Kind string
|
|
|
|
Resource string
|
|
|
|
Reason string
|
|
|
|
Message string
|
|
|
|
}
|
|
|
|
|
|
|
|
//MsgKey is an identified to determine the preset message formats
|
|
|
|
type MsgKey int
|
|
|
|
|
|
|
|
const (
|
|
|
|
FResourcePolcy MsgKey = iota
|
|
|
|
FProcessRule
|
|
|
|
SPolicyApply
|
|
|
|
SRuleApply
|
|
|
|
FPolicyApplyBlockCreate
|
|
|
|
FPolicyApplyBlockUpdate
|
|
|
|
FPolicyApplyBlockUpdateRule
|
|
|
|
)
|