Documentation
¶
Index ¶
- Constants
- func CanonicalHash(in []byte) (string, error)
- func ClientIdentifierFromContext(ctx context.Context) domain.ClientIdentifier
- func CompareJson(a, b []byte) bool
- func ContextFromGeneric(parent context.Context, generic domain.Generic) context.Context
- func ContextFromIdentifiers(parent context.Context, id domain.ClientIdentifier) context.Context
- func FilterAndMarshal(d *unstructured.Unstructured) ([]byte, error)
- func NewClient() (dynamic.Interface, error)
- func PulsarMessageIDtoString(msgID pulsar.MessageID) string
- func StartLivenessProbe()
- func StringValueBigger(s1, s2 string) bool
- type CooldownQueue
Constants ¶
View Source
const ( // Default size for the cooldown queue DefaultQueueSize = 512 // Default TTL for events put in the queue DefaultTTL = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func CanonicalHash ¶
func ClientIdentifierFromContext ¶ added in v0.0.17
func ClientIdentifierFromContext(ctx context.Context) domain.ClientIdentifier
func CompareJson ¶
func ContextFromGeneric ¶
func ContextFromIdentifiers ¶ added in v0.0.5
func FilterAndMarshal ¶ added in v0.0.29
func FilterAndMarshal(d *unstructured.Unstructured) ([]byte, error)
func PulsarMessageIDtoString ¶
PulsarMessageIDtoString is taken from github.com/kubescape/event-ingester-service/utils/common.go:func PulsarMessageIDtoString
func StartLivenessProbe ¶ added in v0.0.17
func StartLivenessProbe()
func StringValueBigger ¶ added in v0.0.17
Types ¶
type CooldownQueue ¶ added in v0.0.8
type CooldownQueue struct { // public channel for reading events ResultChan <-chan watch.Event // contains filtered or unexported fields }
CooldownQueue is a queue that lets clients put events into it with a cooldown
When a client puts an event into a queue, it forwards the event to its output channel and starts a cooldown for this event. If a client attempts to put the same event into the queue while the cooldown is running, the queue will silently drop the event. When the cooldown resets and a client puts the same event into the queue, it will be forwarded to the output channel
func NewCooldownQueue ¶ added in v0.0.8
func NewCooldownQueue(size int, cooldown time.Duration) *CooldownQueue
NewCooldownQueue returns a new Cooldown Queue
func (*CooldownQueue) Closed ¶ added in v0.0.25
func (q *CooldownQueue) Closed() bool
func (*CooldownQueue) Enqueue ¶ added in v0.0.8
func (q *CooldownQueue) Enqueue(e watch.Event)
Enqueue enqueues an event in the Cooldown Queue
func (*CooldownQueue) Stop ¶ added in v0.0.8
func (q *CooldownQueue) Stop()
Click to show internal directories.
Click to hide internal directories.