Documentation ¶
Index ¶
- type ActorSystem
- type Metrics
- func (metrics Metrics) AccountCreated()
- func (metrics Metrics) CommitAccepted()
- func (metrics Metrics) PromiseAccepted()
- func (metrics Metrics) RollbackAccepted()
- func (metrics Metrics) SnapshotsUpdated(count int64)
- func (metrics Metrics) Start()
- func (metrics Metrics) TimeUpdateSaturatedSnapshots(f func())
- type Snapshot
- type SnapshotUpdater
- type Support
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorSystem ¶
ActorSystem represents actor system subroutine
func NewActorSystem ¶
func NewActorSystem(ctx context.Context, cfg config.Configuration, metrics *Metrics) ActorSystem
NewActorSystem returns actor system fascade
type Metrics ¶
type Metrics struct { Support // contains filtered or unexported fields }
Metrics represents metrics subroutine
func NewMetrics ¶
func NewMetrics(ctx context.Context, cfg config.Configuration) Metrics
NewMetrics returns metrics fascade
func (Metrics) AccountCreated ¶
func (metrics Metrics) AccountCreated()
AccountCreated increments account created by one
func (Metrics) CommitAccepted ¶
func (metrics Metrics) CommitAccepted()
CommitAccepted increments accepted commits by one
func (Metrics) PromiseAccepted ¶
func (metrics Metrics) PromiseAccepted()
PromiseAccepted increments accepted promises by one
func (Metrics) RollbackAccepted ¶
func (metrics Metrics) RollbackAccepted()
RollbackAccepted increments accepted rollbacks by one
func (Metrics) SnapshotsUpdated ¶
SnapshotsUpdated increments updated snapshots by given count
func (Metrics) Start ¶
func (metrics Metrics) Start()
Start handles everything needed to start metrics daemon
func (Metrics) TimeUpdateSaturatedSnapshots ¶
func (metrics Metrics) TimeUpdateSaturatedSnapshots(f func())
TimeUpdateSaturatedSnapshots measures time of SaturatedSnapshots function run
type Snapshot ¶
type Snapshot struct { SnapshotCronLatency float64 `json:"snapshotCronLatency"` UpdatedSnapshots int64 `json:"updatedSnapshots"` CreatedAccounts int64 `json:"createdAccounts"` PromisesAccepted int64 `json:"promisesAccepted"` CommitsAccepted int64 `json:"commitsAccepted"` RollbacksAccepted int64 `json:"rollbacksAccepted"` }
Snapshot holds metrics snapshot status
type SnapshotUpdater ¶
type SnapshotUpdater struct { Support // contains filtered or unexported fields }
SnapshotUpdater represents journal saturation update subroutine
func NewSnapshotUpdater ¶
func NewSnapshotUpdater(ctx context.Context, cfg config.Configuration, metrics *Metrics, callback func(msg interface{}, to system.Coordinates, from system.Coordinates)) SnapshotUpdater
NewSnapshotUpdater returns snapshot updater fascade
func (SnapshotUpdater) Start ¶
func (updater SnapshotUpdater) Start()
Start handles everything needed to start snapshot updater daemon it runs scan of accounts snapshots and events and orders accounts to update their snapshot if number of events in given version is larger than threshold
type Support ¶
type Support struct { IsReady chan interface{} // contains filtered or unexported fields }
Support provides support for graceful shutdown
func NewDaemonSupport ¶
NewDaemonSupport constructor