Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "EVENT_PUBLISHER"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Listeners []EventProvider // Signer is a list of Signers used to sign events. Signers []Signer // Transport is used to send events to the Oracle network. Transport transport.Transport // Logger is a current logger interface used by the EventPublisher. The Logger // helps to monitor asynchronous processes. Logger log.Logger }
Config is the configuration for the EventPublisher.
type EventProvider ¶ added in v0.6.0
EventProvider providers events to EventPublisher.
type EventPublisher ¶
type EventPublisher struct {
// contains filtered or unexported fields
}
EventPublisher collects event messages from event providers and publishes them using transport interface.
An event message could be anything Oracle could sign.
func New ¶
func New(cfg Config) (*EventPublisher, error)
New returns a new instance of the EventPublisher struct.
func (*EventPublisher) Start ¶
func (l *EventPublisher) Start(ctx context.Context) error
Start implements the supervisor.Service interface.
func (*EventPublisher) Wait ¶
func (l *EventPublisher) Wait() chan error
Wait implements the supervisor.Service interface.
Click to show internal directories.
Click to hide internal directories.