Documentation ¶
Index ¶
- Variables
- 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, spdxv1beta1.SpdxV1beta1Interface, error)
- func NewMsgId() string
- func PulsarMessageIDtoString(msgID pulsar.MessageID) string
- func ServePprof()
- func StartLivenessProbe()
- func StringValueBigger(s1, s2 string) bool
- type CooldownQueue
- type CronTicker
- type StdTicker
- type Ticker
Constants ¶
This section is empty.
Variables ¶
var Direct = direct{}
Direct is a direct proxy: one that makes network connections directly.
Functions ¶
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 NewClient ¶
func NewClient() (dynamic.Interface, spdxv1beta1.SpdxV1beta1Interface, error)
func PulsarMessageIDtoString ¶
PulsarMessageIDtoString is taken from github.com/kubescape/event-ingester-service/utils/common.go:func PulsarMessageIDtoString
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()
type CronTicker ¶ added in v0.0.83
CronTicker is the struct returned to the user as a proxy to the ticker. The user can check the ticker channel for the next 'tick' via CronTicker.C (similar to the user of time.Timer).
func NewCronTicker ¶ added in v0.0.83
func NewCronTicker(schedule string) (*CronTicker, error)
NewCronTicker returns a CronTicker struct. You can check the ticker channel for the next tick by `CronTicker.Chan()`.
func (*CronTicker) Chan ¶ added in v0.0.83
func (c *CronTicker) Chan() <-chan time.Time
func (*CronTicker) Stop ¶ added in v0.0.83
func (c *CronTicker) Stop()
Stop sends the appropriate message on the control channel to kill the CronTicker goroutines. It's good practice to use `defer CronTicker.Stop()`.