Documentation ¶
Index ¶
- Constants
- func EpochsFromChain(relay *relay.Relay) (*utils.EpochTimingConfig, *utils.RewardEpochConfig, error)
- func ExecuteWithRetryAttempts[T any](f func(int) (T, error), maxRetries int, delay time.Duration) <-chan ExecuteStatus[T]
- func ExecuteWithRetryChan[T any](f func() (T, error), maxRetries int, delay time.Duration) <-chan ExecuteStatus[T]
- func ExistsAsSubstring(slice []string, s string) bool
- func InitMetricsServer(cfg *config.Metrics)
- func ParseProtocolMessageRelayedEvent(relay *relay.Relay, dbLog database.Log) (*relay.RelayProtocolMessageRelayed, error)
- func ParseSigningPolicyInitializedEvent(relay *relay.Relay, dbLog database.Log) (*relay.RelaySigningPolicyInitialized, error)
- func RewardEpochTimingFromChain(fsm *system.FlareSystemsManager) (*utils.EpochTimingConfig, error)
- func Uint16toBytes(i uint16) (arr [2]byte)
- func Uint32toBytes(i uint32) (arr [4]byte)
- func VotingRoundTimingFromChain(fsm *system.FlareSystemsManager) (*utils.EpochTimingConfig, error)
- type ExecuteStatus
- type HealthStatus
- type Message
- type MetricsBase
- type ProtocolMessage
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func EpochsFromChain ¶
func EpochsFromChain(relay *relay.Relay) (*utils.EpochTimingConfig, *utils.RewardEpochConfig, error)
Returns the voting round timing and reward epochs properties from the relay contract.
func ExecuteWithRetryChan ¶
func ExecuteWithRetryChan[T any](f func() (T, error), maxRetries int, delay time.Duration) <-chan ExecuteStatus[T]
ExecuteWithRetryChan executes function with retry until success or maxRetries. Between each retries there is a delay.
func ExistsAsSubstring ¶
ExistsAsSubstring returns true if any of the strings in the slice is a substring of s.
func InitMetricsServer ¶
func RewardEpochTimingFromChain ¶
func RewardEpochTimingFromChain(fsm *system.FlareSystemsManager) (*utils.EpochTimingConfig, error)
func Uint16toBytes ¶
func Uint32toBytes ¶
func VotingRoundTimingFromChain ¶
func VotingRoundTimingFromChain(fsm *system.FlareSystemsManager) (*utils.EpochTimingConfig, error)
Types ¶
type ExecuteStatus ¶
func ExecuteWithRetryWithContext ¶
func ExecuteWithRetryWithContext[T any](ctx context.Context, f func() (T, error), minimalDuration time.Duration) ExecuteStatus[T]
ExecuteWithRetryWithContext retries function f until success or ctx is canceled. Between each retries there is at least minimalDuration time.
type HealthStatus ¶
type HealthStatus int
const ( HealthStatusInitializing HealthStatus = 0 // Default prometheus Gauge value, thus it indicates that it was not updated yet. HealthStatusOk HealthStatus = 1 HealthStatusError HealthStatus = -1 HealthStatusSyncing HealthStatus = -2 )
type MetricsBase ¶
type MetricsBase struct {
// contains filtered or unexported fields
}
func NewMetricsBase ¶
func NewMetricsBase(namespace string) *MetricsBase
func (*MetricsBase) SetStatus ¶
func (m *MetricsBase) SetStatus(status HealthStatus)
type ProtocolMessage ¶
Click to show internal directories.
Click to hide internal directories.