Documentation ¶
Index ¶
- Constants
- func BuildQueryAppliedPath() string
- func BuildQueryPhrasesPath() string
- func BuildQueryTotalPath() string
- func Query(ctx context.Context, route []string, req abci.RequestQuery) (res []byte, err btypes.Error)
- func TotalAppliedInvariant(module string) qtypes.Invariant
- type Mapper
- func (mapper *Mapper) AddAllTotalMintQOSAmount(amount btypes.BigInt)
- func (mapper *Mapper) Copy() mapper.IMapper
- func (mapper *Mapper) DelAllTotalMintQOSAmount()
- func (mapper *Mapper) GetAllTotalMintQOSAmount() (amount btypes.BigInt)
- func (mapper *Mapper) GetFirstBlockTime() (t int64)
- func (mapper *Mapper) GetInflationPhrases() (phrases types.InflationPhrases, exists bool)
- func (mapper *Mapper) GetTotalQOSAmount() (amount btypes.BigInt)
- func (mapper *Mapper) MustGetInflationPhrases() types.InflationPhrases
- func (mapper *Mapper) SetAllTotalMintQOSAmount(amount btypes.BigInt)
- func (mapper *Mapper) SetFirstBlockTime(t int64)
- func (mapper *Mapper) SetInflationPhrases(phrases types.InflationPhrases)
- func (mapper *Mapper) SetTotalQOSAmount(amount btypes.BigInt)
- func (mapper *Mapper) SetUpMetrics(cfg *config.InstrumentationConfig)
- type Metrics
Constants ¶
View Source
const ( Mint = "mint" Phrases = "phrases" Total = "total" Applied = "applied" )
nolint
View Source
const (
MetricsSubsystem = "mint" // module name
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mapper ¶
type Mapper struct { *mapper.BaseMapper Metrics *Metrics // prometheus监控项 }
通胀相关存储操作Mapper
func (*Mapper) AddAllTotalMintQOSAmount ¶
增加流通QOS总数
func (*Mapper) DelAllTotalMintQOSAmount ¶
func (mapper *Mapper) DelAllTotalMintQOSAmount()
删除流通QOS总数
func (*Mapper) GetAllTotalMintQOSAmount ¶
获取流通QOS总数
func (*Mapper) GetInflationPhrases ¶
func (mapper *Mapper) GetInflationPhrases() (phrases types.InflationPhrases, exists bool)
获取通胀规则
func (*Mapper) GetTotalQOSAmount ¶
获取QOS发行总量(已发行+待发行)
func (*Mapper) MustGetInflationPhrases ¶
func (mapper *Mapper) MustGetInflationPhrases() types.InflationPhrases
获取通胀规则,不存在时panic
func (*Mapper) SetAllTotalMintQOSAmount ¶
设置流通QOS总数
func (*Mapper) SetInflationPhrases ¶
func (mapper *Mapper) SetInflationPhrases(phrases types.InflationPhrases)
保存通胀规则
func (*Mapper) SetTotalQOSAmount ¶
设置QOS发行总量
func (*Mapper) SetUpMetrics ¶ added in v0.0.8
func (mapper *Mapper) SetUpMetrics(cfg *config.InstrumentationConfig)
设置prometheus监控项
type Metrics ¶ added in v0.0.8
type Metrics struct { TotalAppliedQOS metrics.Gauge // total applied QOS MintPerBlockQOS metrics.Gauge // mint QOS per block GasFeePerBlockQOS metrics.Gauge // gas fee per block }
func NopMetrics ¶ added in v0.0.8
func NopMetrics() *Metrics
func PrometheusMetrics ¶ added in v0.0.8
func PrometheusMetrics(cfg *config.InstrumentationConfig) *Metrics
注册本模块监控项
Click to show internal directories.
Click to hide internal directories.