entities

package
v0.11.1-preview.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func UnHealthyReasonString added in v0.9.0

func UnHealthyReasonString(reason UnhealthyReason) string

Types

type BalanceSourceType

type BalanceSourceType string
const (
	AssetPoolBalanceType                  BalanceSourceType = "ASSET_POOL"
	PartiesTotalBalanceType               BalanceSourceType = "PARTIES_TOTAL"
	UnrealisedWithdrawalsTotalBalanceType BalanceSourceType = "UNREALISED_WITHDRAWALS_TOTAL"
)

func (BalanceSourceType) IsValid

func (n BalanceSourceType) IsValid() error

type BlockSigner

type BlockSigner struct {
	VegaTime time.Time                         `db:"vega_time"`
	Role     BlockSignerRole                   `db:"role"`
	TmPubKey vega_entities.TendermintPublicKey `db:"tendermint_pub_key"`
}

type BlockSignerRole

type BlockSignerRole string
const (
	BlockSignerRoleProposer BlockSignerRole = "ROLE_PROPOSER"
	BlockSignerRoleSigner   BlockSignerRole = "ROLE_SIGNER"
)

func (BlockSignerRole) IsValid

func (n BlockSignerRole) IsValid() error

type MetaMonitoringStatusCheck added in v0.6.0

type MetaMonitoringStatusCheck struct {
	CheckName  string
	IsHealthy  int32
	LastUpdate *time.Time
}

type MonitoringServiceType added in v0.9.0

type MonitoringServiceType string
const (
	BlockSignersSvc       MonitoringServiceType = "BLOCK_SIGNERS"
	SegmentsSvc           MonitoringServiceType = "SEGMENTS"
	CometTxsSvc           MonitoringServiceType = "COMET_TXS"
	NetworkBalancesSvc    MonitoringServiceType = "NETWORK_BALANCES"
	AssetPricesSvc        MonitoringServiceType = "ASSET_PRICES"
	PromEthereumCallsSvc  MonitoringServiceType = "PROMETHEUS_ETHEREUM_CALLS_SERVICE"
	PromEthNodeScannerSvc MonitoringServiceType = "PROMETHEUS_ETH_NODE_SCANNER"
	PromNodeScannerSvc    MonitoringServiceType = "PROMETHEUS_NODE_SCANNER"
	PromMetamonitoringSvc MonitoringServiceType = "PROMETHEUS_METAMONITORING"
)

type MonitoringStatus added in v0.9.0

type MonitoringStatus struct {
	StatusTime      time.Time             `db:"status_time"`
	IsHealthy       bool                  `db:"is_healthy"`
	Service         MonitoringServiceType `db:"monitoring_service"`
	UnhealthyReason UnhealthyReason       `db:"unhealthy_reason"`
}

func (MonitoringStatus) UnhealthyReasonString added in v0.9.0

func (s MonitoringStatus) UnhealthyReasonString() string

type NetworkBalance

type NetworkBalance struct {
	BalanceTime             time.Time
	AssetEthereumHexAddress string
	BalanceSource           BalanceSourceType
	Balance                 decimal.Decimal
}

func NewAssetPoolBalance

func NewAssetPoolBalance(time time.Time, assetHexAddress string, balance decimal.Decimal) NetworkBalance

type TendermintAddress

type TendermintAddress string

func (*TendermintAddress) Bytes

func (pk *TendermintAddress) Bytes() ([]byte, error)

func (TendermintAddress) EncodeBinary

func (pk TendermintAddress) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)

func (*TendermintAddress) String

func (pk *TendermintAddress) String() string

type UnhealthyReason added in v0.9.0

type UnhealthyReason int
const (
	ReasonUnknown                  UnhealthyReason = 0
	ReasonMissingStatusFromService UnhealthyReason = 1
	ReasonNetworkIsNotUpToDate     UnhealthyReason = 2
	ReasonTargetConnectionFailure  UnhealthyReason = 3

	ReasonEthereumGetBalancesFailure          UnhealthyReason = 4
	ReasonEthereumContractCallFailure         UnhealthyReason = 5
	ReasonEthereumContractInvalidResponseType UnhealthyReason = 6
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL