prysm-pulse/beacon-chain/core/feed/event.go
Raul Jordan 3416962fc2
All Beacon Node Package-Level Godocs (#5677)
* package level godocs fixed

* all beacon node godocs

* comment and gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-04-29 12:40:33 -05:00

22 lines
773 B
Go

// Package feed defines event feed types for inter-service communication
// during a beacon node's runtime.
package feed
// How to add a new event to the feed:
// 1. Add a file for the new type of feed.
// 2. Add a constant describing the list of events.
// 3. Add a structure with the name `<event>Data` containing any data fields that should be supplied with the event.
//
// Note that the same event is supplied to all subscribers, so the event received by subscribers should be considered read-only.
// EventType is the type that defines the type of event.
type EventType int
// Event is the event that is sent with operation feed updates.
type Event struct {
// Type is the type of event.
Type EventType
// Data is event-specific data.
Data interface{}
}