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 []Listener // Signer is a list of Signers used to sign events. Signers []Signer // Transport is implementation of transport used to send events to relayers. Transport transport.Transport // Logger is a current logger interface used by the EventPublisher. The Logger // helps to monitor asynchronous processes. Logger log.Logger }
Config contains configuration parameters for EventPublisher.
type EventPublisher ¶
type EventPublisher struct {
// contains filtered or unexported fields
}
EventPublisher collects event messages from listeners and publishes them using transport.
func New ¶
func New(ctx context.Context, cfg Config) (*EventPublisher, error)
New returns a new instance of the EventPublisher struct.
func (*EventPublisher) Start ¶
func (l *EventPublisher) Start() error
func (*EventPublisher) Wait ¶
func (l *EventPublisher) Wait() chan error
Wait waits until the context is canceled or until an error occurs.
Click to show internal directories.
Click to hide internal directories.