event_tracker

package
v17.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "event_tracker"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	// DeduplicateKey returns a unique key for the event to deduplicate it
	DeduplicateKey() string
}

type EventData

type EventData struct {
	Events map[string][]Event
}

EventData is a struct that contains all the eventLists and used to send them to GitLab

func (*EventData) IsEmpty

func (ed *EventData) IsEmpty() bool

type EventTracker

type EventTracker struct {
	// contains filtered or unexported fields
}

func NewEventTracker

func NewEventTracker() *EventTracker

func (*EventTracker) AccumulatedEvents

func (et *EventTracker) AccumulatedEvents() int64

func (*EventTracker) CloneEventData

func (et *EventTracker) CloneEventData() *EventData

func (*EventTracker) GetEventSizeLimit

func (et *EventTracker) GetEventSizeLimit() <-chan struct{}

func (*EventTracker) RegisterEvent

func (et *EventTracker) RegisterEvent(name string) EventsInterface

func (*EventTracker) Subtract

func (et *EventTracker) Subtract(ed *EventData)

type EventTrackerCollector

type EventTrackerCollector interface {
	CloneEventData() *EventData
	Subtract(*EventData)
	AccumulatedEvents() int64
	GetEventSizeLimit() <-chan struct{}
}

type EventTrackerInterface

type EventTrackerInterface interface {
	EventTrackerRegisterer
	EventTrackerCollector
}

type EventTrackerRegisterer

type EventTrackerRegisterer interface {
	RegisterEvent(name string) EventsInterface
}

type Events

type Events struct {
	// contains filtered or unexported fields
}

func (*Events) EmitEvent

func (e *Events) EmitEvent(event Event)

func (*Events) Subtract

func (e *Events) Subtract(v []Event)

type EventsInterface

type EventsInterface interface {
	EmitEvent(event Event)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL