event_tracker

package
v16.11.10 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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