Back to

Package abicodec

Latest Go to latest

The highest tagged major version is .

Published: May 12, 2020 | License: Apache-2.0 | Module:


type ABICacheItem

type ABICacheItem struct {
	ABI      *eos.ABI
	BlockNum uint32

type ABISyncer

type ABISyncer struct {
	// contains filtered or unexported fields

func NewSyncer

func NewSyncer(cache Cache, dbReader eosdb.DBReader, searchAddr string, onLive func()) (*ABISyncer, error)

func (*ABISyncer) Sync

func (s *ABISyncer) Sync()

type Backuper

type Backuper struct {

	IsLive bool
	// contains filtered or unexported fields

func NewBackuper

func NewBackuper(cache Cache, exportCache bool, exportURL string) *Backuper

func (*Backuper) BackupPeriodically

func (b *Backuper) BackupPeriodically(every time.Duration)

type Cache

type Cache interface {
	ABIAtBlockNum(account string, blockNum uint32) *ABICacheItem
	SetABIAtBlockNum(account string, blockNum uint32, abi *eos.ABI)
	RemoveABIAtBlockNum(account string, blockNum uint32)
	SaveState() error
	SetCursor(cursor string)
	GetCursor() string
	Upload(url string) error

type Decoder

type Decoder struct {
	// contains filtered or unexported fields

func NewDecoder

func NewDecoder(cache Cache) *Decoder

func (*Decoder) DecodeAction

func (d *Decoder) DecodeAction(ctx context.Context, req *pbabicodec.DecodeActionRequest) (*pbabicodec.Response, error)

func (*Decoder) DecodeTable

func (d *Decoder) DecodeTable(cxt context.Context, req *pbabicodec.DecodeTableRequest) (*pbabicodec.Response, error)

func (*Decoder) GetAbi

func (d *Decoder) GetAbi(ctx context.Context, req *pbabicodec.GetAbiRequest) (*pbabicodec.Response, error)

type DefaultCache

type DefaultCache struct {
	Abis   map[string][]*ABICacheItem // from account to the ABIs in range
	Cursor string                     `json:"cursor"`
	// contains filtered or unexported fields

func NewABICache

func NewABICache(store dstore.Store, cacheName string) (*DefaultCache, error)

func (*DefaultCache) ABIAtBlockNum

func (c *DefaultCache) ABIAtBlockNum(account string, blockNum uint32) *ABICacheItem

func (*DefaultCache) GetCursor

func (c *DefaultCache) GetCursor() string

func (*DefaultCache) Load

func (c *DefaultCache) Load(workerID string) (string, error)

func (*DefaultCache) RemoveABIAtBlockNum

func (c *DefaultCache) RemoveABIAtBlockNum(account string, blockNum uint32)

func (*DefaultCache) Save

func (c *DefaultCache) Save(cursor string, workerID string) error

func (*DefaultCache) SaveState

func (c *DefaultCache) SaveState() error

func (*DefaultCache) SetABIAtBlockNum

func (c *DefaultCache) SetABIAtBlockNum(account string, blockNum uint32, abi *eos.ABI)

func (*DefaultCache) SetCursor

func (c *DefaultCache) SetCursor(cursor string)

func (*DefaultCache) Upload

func (c *DefaultCache) Upload(storeUrl string) error

type IsLive

type IsLive chan interface{}

type Server

type Server struct {
	// contains filtered or unexported fields

func NewServer

func NewServer(cache Cache, grpcListenAddr string) *Server

func (*Server) Serve

func (s *Server) Serve()

func (*Server) SetReady

func (s *Server) SetReady()

func (*Server) Stop

func (s *Server) Stop(err error)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier