Documentation
¶
Index ¶
- Variables
- 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 DeptMsgIdFromContext(ctx context.Context) (int, string)
- func FileContent(path string) []byte
- func FileToUnstructured(path string) *unstructured.Unstructured
- func GetDialer() func(context.Context, string, string) (net.Conn, error)
- func GreaterOrEqualVersion(a string, b string) bool
- func IsBatchMessageSupported(version string) bool
- func NewBackOff() backoff.BackOff
- func NewClient() (dynamic.Interface, error)
- func NewMsgId() string
- func PulsarMessageIDtoString(msgID pulsar.MessageID) string
- func RemoveManagedFields(d *unstructured.Unstructured)
- func RemoveSpecificFields(d *unstructured.Unstructured, fields [][]string) error
- func ServePprof()
- func StartLivenessProbe()
- func StringValueBigger(s1, s2 string) bool
- type CooldownQueue
Constants ¶
This section is empty.
Variables ¶
var Direct = direct{}
Direct is a direct proxy: one that makes network connections directly.
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 DeptMsgIdFromContext ¶ added in v0.0.59
func FileContent ¶ added in v0.0.65
func FileToUnstructured ¶ added in v0.0.65
func FileToUnstructured(path string) *unstructured.Unstructured
func GetDialer ¶ added in v0.0.32
GetDialer returns a net.DialContext function that uses a proxy if necessary. HTTP_PROXY and HTTPS_PROXY are used to determine the proxy to use. NO_PROXY is currently ignored.
func GreaterOrEqualVersion ¶ added in v0.0.63
GreaterOrEqualVersion returns true if a version is greater or equal to b
func IsBatchMessageSupported ¶ added in v0.0.63
func NewBackOff ¶ added in v0.0.32
func NewBackOff() backoff.BackOff
func PulsarMessageIDtoString ¶
PulsarMessageIDtoString is taken from github.com/kubescape/event-ingester-service/utils/common.go:func PulsarMessageIDtoString
func RemoveManagedFields ¶ added in v0.0.26
func RemoveManagedFields(d *unstructured.Unstructured)
func RemoveSpecificFields ¶ added in v0.0.65
func RemoveSpecificFields(d *unstructured.Unstructured, fields [][]string) error
func ServePprof ¶ added in v0.0.36
func ServePprof()
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 waits for a cooldown period before the event is forwarded to the consumer. If and event for the same key is put into the queue again before the cooldown period is over, the event is overridden and the cooldown period is reset.
func NewCooldownQueue ¶ added in v0.0.8
func NewCooldownQueue() *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()