ingestevents

package
v0.0.0-...-2ad2f98 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package ingestevents is a package with helper functions for ingestion PubSub events, the ones that are sent when a file in done ingesting and received by a clusterer to trigger regression detection. See DESIGN.md#event-driven-alerting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePubSubBody

func CreatePubSubBody(body *IngestEvent) ([]byte, error)

CreatePubSubBody takes an IngestEvent and returns a byte slice that is a gzipp'd JSON encoded version of that event. We gzip the to stay below the 10MB limit for PubSub data.

Types

type IngestEvent

type IngestEvent struct {
	// TraceIDs is a list of all the unencoded trace ids that appeared in the ingested file.
	TraceIDs []string

	// ParamSet is the unencoded ParamSet summary of TraceIDs.
	ParamSet paramtools.ReadOnlyParamSet

	// Filename of the file ingested.
	Filename string
}

IngestEvent is the PubSub body that is sent from the ingesters each time a new file is ingested.

func DecodePubSubBody

func DecodePubSubBody(b []byte) (*IngestEvent, error)

DecodePubSubBody decodes an IngestEvent encoded by CreatePubSubBody.

Jump to

Keyboard shortcuts

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