package
0.79.0-preview.4
Repository: https://github.com/vegaprotocol/vega.git
Documentation: pkg.go.dev
# README
Event bus
Add a new event
- Create a protobuf message to describe your event in the
proto
folder. - Register your event in
BusEventType
enum andBusEvent.event
message inproto/events.proto
. - Generate the code with
make proto
. - In
events/bus.go
, create a constant to identify the event and map it to the protobuf enum typeBusEventType
in variableprotoMap
andtoProto
. Give it a name ineventStrings
. - In the
events
folder, create a filemy_event.go
where the Golang definition of the new event will live:
package events
import (
eventspb "code.vegaprotocol.io/vega/protos/vega/events/v1"
)
type MyEvent struct {
*Base
o eventspb.MyEvent
}
- Implement the
StreamEvent
interface on it. - Implement the "FromStream interface on it.
- Add the support for this new event into the
Service
responsible for it. - Update the graphql structures in the data-node in schema.graphql. In particular the
BusEventType
enum and theEvent
union
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MarketEvents return all the possible market events.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewAuctionEvent creates a new auction event object.
NewTime returns a new time Update event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewTime returns a new time Update event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewLedgerMovements returns an event with transfer responses - this is the replacement of the transfer buffer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewProtocolUpgradeStarted returns a new time Update event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewTime returns a new time Update event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProtoToInternal converts the proto message enum to our internal constants we're not using a map to de-duplicate the event types here, so we can exploit duplicating the same event to control the internal subscriber channel buffer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TryFromString tries to parse a raw string into an event type, false indicates that.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
All event type -> used by subscribers to just receive all events, has no actual corresponding event payload.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
this event is not used for any specific event, but by subscribers that aggregate all market events (e.g.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
other event types that DO have corresponding event types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Base common denominator all event-bus events share.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DistressedOrders contains the market and parties that needed to have their orders closed in order to maintain their open positions on the market.
DistressedPositions contains the market and parties that needed to have their orders closed in order to maintain their open positions on the market.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EthereumKeyRotation ...
ExpiredOrders contains the market and parties that needed to have their orders closed in order to maintain their open positions on the market.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
KeyRotation ...
No description provided by the author
No description provided by the author
No description provided by the author
MarginLevels - the margin levels event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NodeSignature ...
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StateVar is an event for tracking consensus in floating point state variables.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Time event indicating a change in block time (ie time update).
No description provided by the author
No description provided by the author
No description provided by the author
TransferFees ...
TransferFeesDiscountUpdated ...
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ValidatorUpdate ...
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
Event - the base event interface type, add sequence ID setter here, because the type assertions in broker seem to be a bottleneck.
FeeTransfer is a transfer initiated after trade occurs.
LossSocialization ...
Margin is an event with a change to balances after settling e.g.
MarketPosition is an event with a change to a position.
No description provided by the author
No description provided by the author
Risk is an event that summarizes everything and an eventual update to margin account.
SettlePosition is an event that the settlement buffer will propagate through the system used by the plugins (currently only the positions API).
TradeSettlement Part of the SettlePosition interface -> traces trades as they happened.
Transfer is an event passed on by settlement engine, contains position and the resulting transfer for the collateral engine to use.
# Type aliases
No description provided by the author