eventrecorder

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HttpTimeout = 5 * time.Second
View Source
var ParallelPosters = 5

Functions

This section is empty.

Types

type EventDetailsError added in v0.3.0

type EventDetailsError struct {
	Error string `json:"error"`
}

eventDetailsError is for the EventDetails in the case of a query or retrieval failure

type EventDetailsIndexer added in v0.4.3

type EventDetailsIndexer struct {
	CandidateCount uint64   `json:"candidateCount"`
	Protocols      []string `json:"protocols"`
}

type EventDetailsSuccess added in v0.3.0

type EventDetailsSuccess struct {
	ReceivedSize uint64 `json:"receivedSize"`
	ReceivedCids uint64 `json:"receivedCids"`
	Duration     uint64 `json:"durationMs"`
}

eventDetailsSuccess is for the EventDetails in the case of a retrieval success

type EventRecorder

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

EventRecorder receives events from the retrieval manager and posts event data to a given endpoint as POSTs with JSON bodies

func NewEventRecorder

func NewEventRecorder(ctx context.Context, cfg EventRecorderConfig) *EventRecorder

NewEventRecorder creates a new event recorder with the ID of this instance and the URL to POST to

func (*EventRecorder) RecordEvent added in v0.3.0

func (er *EventRecorder) RecordEvent(event types.RetrievalEvent)

type EventRecorderConfig added in v0.4.3

type EventRecorderConfig struct {
	DisableIndexerEvents  bool
	InstanceID            string
	EndpointURL           string
	EndpointAuthorization string
}

type MultiEventReport added in v0.3.0

type MultiEventReport struct {
	Events []eventReport `json:"events"`
}

Directories

Path Synopsis
A simple HTTP server that receives EventRecorder events and writes them, as line-delimited JSON to an output file.
A simple HTTP server that receives EventRecorder events and writes them, as line-delimited JSON to an output file.

Jump to

Keyboard shortcuts

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