Documentation ¶
Index ¶
- type Cache
- func (cache *Cache) Add(key string, value string) error
- func (cache *Cache) BulkInsertAggState(aggStates []types.AggState) error
- func (cache *Cache) BulkInsertBtcAggState(aggStates []types.AnchorBtcAggState) error
- func (cache *Cache) BulkInsertBtcTxState(txStates []types.AnchorBtcTxState) error
- func (cache *Cache) BulkInsertCalState(calStates []types.CalStateObject) error
- func (cache *Cache) BulkInsertProofs(proofs []types.ProofState) error
- func (cache *Cache) Del(key string, value string) error
- func (cache *Cache) Get(key string) ([]string, error)
- func (cache *Cache) GetAggStateObjectsByProofIds(proofIds []string) ([]types.AggState, error)
- func (cache *Cache) GetAnchorBTCAggStateObjectsByCalIds(calIds []string) ([]types.AnchorBtcAggState, error)
- func (cache *Cache) GetBTCTxStateObjectByAnchorBTCAggId(aggId string) (types.AnchorBtcTxState, error)
- func (cache *Cache) GetCalStateObjectsByAggIds(aggIds []string) ([]types.CalStateObject, error)
- func (cache *Cache) GetOne(key string) (string, error)
- func (cache *Cache) GetProofIdsByAggIds(aggIds []string) ([]string, error)
- func (cache *Cache) GetProofIdsByBtcTxId(btcTxId string) ([]string, error)
- func (cache *Cache) GetProofsByProofIds(proofIds []string) (map[string]types.ProofState, error)
- func (cache *Cache) PruneOldState()
- func (cache *Cache) Set(key string, value string) error
- func (cache *Cache) SetArray(key string, values []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
func (*Cache) BulkInsertAggState ¶
BulkInsertAggState : inserts aggregator state into postgres
func (*Cache) BulkInsertBtcAggState ¶
func (cache *Cache) BulkInsertBtcAggState(aggStates []types.AnchorBtcAggState) error
BulkInsertBtcAggState : inserts aggregator state into postgres
func (*Cache) BulkInsertBtcTxState ¶
func (cache *Cache) BulkInsertBtcTxState(txStates []types.AnchorBtcTxState) error
BulkInsertBtcTxState : inserts aggregator state into postgres
func (*Cache) BulkInsertCalState ¶
func (cache *Cache) BulkInsertCalState(calStates []types.CalStateObject) error
BulkInsertCalState : inserts aggregator state into postgres
func (*Cache) BulkInsertProofs ¶
func (cache *Cache) BulkInsertProofs(proofs []types.ProofState) error
BulkInsertProofs : Use pg driver and loop to create bulk proof insert statement
func (*Cache) GetAggStateObjectsByProofIds ¶
GetAggStateObjectsByProofIds : Get aggstate objects, given an array of proofIds
func (*Cache) GetAnchorBTCAggStateObjectsByCalIds ¶
func (cache *Cache) GetAnchorBTCAggStateObjectsByCalIds(calIds []string) ([]types.AnchorBtcAggState, error)
GetAnchorBTCAggStateObjectsByCalIds: Get anchor state objects, given an array of calIds
func (*Cache) GetBTCTxStateObjectByAnchorBTCAggId ¶
func (cache *Cache) GetBTCTxStateObjectByAnchorBTCAggId(aggId string) (types.AnchorBtcTxState, error)
GetBTCTxStateObjectByAnchorBTCAggId: Get btc state objects, given an array of agg ids
func (*Cache) GetCalStateObjectsByAggIds ¶
func (cache *Cache) GetCalStateObjectsByAggIds(aggIds []string) ([]types.CalStateObject, error)
GetCalStateObjectsByProofIds : Get calstate objects, given an array of aggIds
func (*Cache) GetProofIdsByAggIds ¶
GetProofIdsByAggIds : get proof ids from agg table, based on aggId
func (*Cache) GetProofIdsByBtcTxId ¶
GetProofIdsByBtcTxId : get proof ids from proof table, based on btctxId
func (*Cache) GetProofsByProofIds ¶
GetProofsByProofIds : get proofs from proof table, based on id
func (*Cache) PruneOldState ¶
func (cache *Cache) PruneOldState()