event_tracker

package
v16.9.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 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 struct {
	UserID    int64
	ProjectID int64
}

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 added in v16.9.0

func (et *EventTracker) AccumulatedEvents() int64

func (*EventTracker) CloneEventData

func (et *EventTracker) CloneEventData() *EventData

func (*EventTracker) GetEventSizeLimit added in v16.9.0

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(userID, projectID int64)

func (*Events) Subtract added in v16.9.0

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

type EventsInterface

type EventsInterface interface {
	EmitEvent(userID, projectID int64)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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