mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 05:38:55 +00:00
3416962fc2
* 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>
22 lines
773 B
Go
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{}
|
|
}
|