Documentation
¶
Index ¶
- Constants
- Variables
- func EnsureSchema(pg *sql.DB) error
- func FetchGenesis(ctx context.Context, c *TendermintClient) (*domain.GenesisState, error)
- func Sync(ctx context.Context, tmc *TendermintClient, st *Store, hrp string) (uint, error)
- type ABCIInfo
- type Block
- type Configuration
- type QueryError
- type Store
- func (st *Store) AddAccountCertificates(ctx context.Context, msg *types.MsgAddAccountCertificates) (int64, error)
- func (st *Store) DeleteAccount(ctx context.Context, msg *types.MsgDeleteAccount) error
- func (st *Store) DeleteAccountCerts(ctx context.Context, msg *types.MsgDeleteAccountCertificate) error
- func (st *Store) DeleteDomain(ctx context.Context, msg *types.MsgDeleteDomain) error
- func (st *Store) InsertBlock(ctx context.Context, b Block) error
- func (st *Store) InsertGenesis(ctx context.Context, tmc *TendermintClient) error
- func (st *Store) LastNBlock(ctx context.Context, limit, after int) ([]*Block, error)
- func (st *Store) LatestBlock(ctx context.Context) (*Block, error)
- func (st *Store) RegisterAccount(ctx context.Context, msg *types.MsgRegisterAccount) (int64, error)
- func (st *Store) RegisterDomain(ctx context.Context, msg *types.MsgRegisterDomain) (int64, error)
- func (st *Store) ReplaceAccountMetadata(ctx context.Context, msg *types.MsgReplaceAccountMetadata) error
- func (st *Store) ReplaceAccountResources(ctx context.Context, msg *types.MsgReplaceAccountResources) (int64, error)
- func (st *Store) TransferAccount(ctx context.Context, msg *types.MsgTransferAccount) error
- func (st *Store) TransferDomain(ctx context.Context, msg *types.MsgTransferDomain) error
- type TendermintBlock
- type TendermintClient
- type TendermintCommit
Constants ¶
View Source
const ModuleName = "block-metrics"
Variables ¶
View Source
var ( ErrNotImplemented = errors.Register(ModuleName, 1, "not implemented") ErrFailedResponse = errors.Register(ModuleName, 2, "failed response") ErrConflict = errors.Register(ModuleName, 3, "conflict") ErrLimit = errors.Register(ModuleName, 4, "limit") ErrNotFound = errors.Register(ModuleName, 5, "not found") ErrDenom = errors.Register(ModuleName, 6, "denomination not supported") )
View Source
var ModuleCdc *codec.Codec
Functions ¶
func EnsureSchema ¶
func FetchGenesis ¶
func FetchGenesis(ctx context.Context, c *TendermintClient) (*domain.GenesisState, error)
Types ¶
type Configuration ¶
type QueryError ¶
func (*QueryError) Error ¶
func (e *QueryError) Error() string
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddAccountCertificates ¶
func (*Store) DeleteAccount ¶
func (*Store) DeleteAccountCerts ¶
func (*Store) DeleteDomain ¶
func (*Store) InsertGenesis ¶
func (st *Store) InsertGenesis(ctx context.Context, tmc *TendermintClient) error
func (*Store) LastNBlock ¶
func (*Store) RegisterAccount ¶
func (*Store) RegisterDomain ¶
func (*Store) ReplaceAccountMetadata ¶
func (*Store) ReplaceAccountResources ¶
func (*Store) TransferAccount ¶
func (*Store) TransferDomain ¶
type TendermintBlock ¶
type TendermintBlock struct { Height int64 Time time.Time Transactions []*auth.StdTx TransactionHashes [][32]byte }
func FetchBlock ¶
func FetchBlock(ctx context.Context, c *TendermintClient, height int64) (*TendermintBlock, error)
type TendermintClient ¶
type TendermintClient struct {
// contains filtered or unexported fields
}
func DialTendermint ¶
func DialTendermint(websocketURL string) (*TendermintClient, error)
DialTendermint returns a client that is maintains a websocket connection to tendermint API. The websocket is used instead of standard HTTP connection to lower the latency, bypass throttling and to allow subscription requests.
func (*TendermintClient) Close ¶
func (c *TendermintClient) Close() error
func (*TendermintClient) Do ¶
func (c *TendermintClient) Do(method string, dest interface{}, args ...interface{}) error
Do makes a jsonrpc call. This method is safe for concurrent calls.
Use API as described in https://tendermint.com/rpc/
Click to show internal directories.
Click to hide internal directories.