Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrReceiveTimeout is returned when no message is received after a // specified duration in Receive ErrReceiveTimeout = errors.New("timeout waiting for message") )
Functions ¶
This section is empty.
Types ¶
type StatsPusher ¶
type StatsPusher struct { ORM *orm.ORM WSClient WebSocketClient Period time.Duration // contains filtered or unexported fields }
StatsPusher polls for events and pushes them via a WebSocketClient
func NewStatsPusher ¶
func NewStatsPusher(orm *orm.ORM, url *url.URL, accessKey, secret string, afters ...utils.Afterer) *StatsPusher
NewStatsPusher returns a new event queuer
func (*StatsPusher) PushNow ¶
func (sp *StatsPusher) PushNow()
PushNow wakes up the stats pusher, asking it to push all queued events immediately.
type SyncJobRunPresenter ¶
SyncJobRunPresenter presents a JobRun for synchronization purposes
func (SyncJobRunPresenter) MarshalJSON ¶
func (p SyncJobRunPresenter) MarshalJSON() ([]byte, error)
MarshalJSON returns the JobRun as JSON
type TxStatus ¶
type TxStatus string
TxStatus indicates if a transaction is fulfilled or not
const ( // StatusFulfilledRunLog indicates that a ChainlinkFulfilled event was // detected in the transaction receipt. StatusFulfilledRunLog TxStatus = "fulfilledRunLog" // StatusNoFulfilledRunLog indicates that no ChainlinkFulfilled events were // detected in the transaction receipt. StatusNoFulfilledRunLog = "noFulfilledRunLog" )
type WebSocketClient ¶
type WebSocketClient interface { Start() error Close() error Send([]byte) Receive(...time.Duration) ([]byte, error) }
WebSocketClient encapsulates all the functionality needed to push run information to explorer.
func NewWebSocketClient ¶
func NewWebSocketClient(url *url.URL, accessKey, secret string) WebSocketClient
NewWebSocketClient returns a stats pusher using a websocket for delivery.
Click to show internal directories.
Click to hide internal directories.