Documentation ¶
Index ¶
- Variables
- func Connect(host, port, user, pass, dbname string) (*sql.DB, error)
- func DisableLog()
- func RoundValue(input float64) string
- func UnixTimeToString(t int64) string
- func UseLogger(logger slog.Logger)
- type PgDb
- func (pg *PgDb) AddPowData(ctx context.Context, data []pow.PowData) error
- func (pg *PgDb) AddPowDataFromSync(ctx context.Context, data interface{}) error
- func (pg *PgDb) AddVspSourceFromSync(ctx context.Context, vspData interface{}) error
- func (pg *PgDb) AddVspTicksFromSync(ctx context.Context, tick datasync.VSPTickSyncDto) error
- func (pg *PgDb) AllExchange(ctx context.Context) (models.ExchangeSlice, error)
- func (pg *PgDb) AllExchangeTicks(ctx context.Context, currencyPair string, interval, offset, limit int) ([]ticks.TickDto, int64, error)
- func (pg *PgDb) AllExchangeTicksCurrencyPair(ctx context.Context) ([]ticks.TickDtoCP, error)
- func (pg *PgDb) AllExchangeTicksInterval(ctx context.Context) ([]ticks.TickDtoInterval, error)
- func (pg PgDb) AllNodeContries(ctx context.Context) (countries []string, err error)
- func (pg PgDb) AllNodeVersions(ctx context.Context) (versions []string, err error)
- func (pg *PgDb) AllVSPTicks(ctx context.Context, offset, limit int) ([]vsp.VSPTickDto, int64, error)
- func (pg PgDb) AttemptPeer(ctx context.Context, address string, now int64) error
- func (pg PgDb) AverageLatency(ctx context.Context, address string) (int, error)
- func (pg *PgDb) BlockBinTableExits() bool
- func (pg *PgDb) BlockCount(ctx context.Context) (int64, error)
- func (pg *PgDb) BlockTableExits() bool
- func (pg PgDb) BlockTableName() string
- func (pg *PgDb) Blocks(ctx context.Context, offset int, limit int) ([]mempool.BlockDto, error)
- func (pg *PgDb) BlocksWithoutVotes(ctx context.Context, offset int, limit int) ([]mempool.BlockDto, error)
- func (pg *PgDb) Close() error
- func (pg *PgDb) CommunityChart(ctx context.Context, platform string, dataType string, ...) (stats []commstats.ChartData, err error)
- func (pg *PgDb) CountGithubStat(ctx context.Context, repository string) (int64, error)
- func (pg *PgDb) CountRedditStat(ctx context.Context, subreddit string) (int64, error)
- func (pg *PgDb) CountTwitterStat(ctx context.Context, handle string) (int64, error)
- func (pg *PgDb) CountYoutubeStat(ctx context.Context, channel string) (int64, error)
- func (pg *PgDb) CreateBlockBinTable() error
- func (pg *PgDb) CreateBlockTable() error
- func (pg *PgDb) CreateExchangeTable() error
- func (pg *PgDb) CreateExchangeTickIndex() error
- func (pg *PgDb) CreateExchangeTickTable() error
- func (pg *PgDb) CreateGithubTable() error
- func (pg *PgDb) CreateHeartbeatTable() error
- func (pg *PgDb) CreateMempoolDataTable() error
- func (pg *PgDb) CreateMempoolDayBinTable() error
- func (pg *PgDb) CreateNetworkNodeTable() error
- func (pg *PgDb) CreateNetworkSnapshotBinTable() error
- func (pg *PgDb) CreateNetworkSnapshotTable() error
- func (pg *PgDb) CreateNodeLocationTable() error
- func (pg *PgDb) CreateNodeVersoinTable() error
- func (pg *PgDb) CreatePowBinTable() error
- func (pg *PgDb) CreatePowDataTable() error
- func (pg *PgDb) CreatePropagationTable() error
- func (pg *PgDb) CreateRedditTable() error
- func (pg *PgDb) CreateTwitterTable() error
- func (pg *PgDb) CreateVSPInfoTables() error
- func (pg *PgDb) CreateVSPTickBinTable() error
- func (pg *PgDb) CreateVSPTickIndex() error
- func (pg *PgDb) CreateVSPTickTables() error
- func (pg *PgDb) CreateVoteReceiveTimeDeviationTable() error
- func (pg *PgDb) CreateVoteTable() error
- func (pg *PgDb) CreateYoutubeTable() error
- func (pg *PgDb) CurrencyPairByExchange(ctx context.Context, exchangeName string) ([]ticks.TickDtoCP, error)
- func (pg PgDb) DeleteSnapshot(ctx context.Context, timestamp int64)
- func (pg *PgDb) DropAllTables() error
- func (pg *PgDb) DropCacheTables() error
- func (pg *PgDb) ExchangeTableExits() bool
- func (pg *PgDb) ExchangeTableName() string
- func (pg *PgDb) ExchangeTickCount(ctx context.Context) (int64, error)
- func (pg *PgDb) ExchangeTickTableExits() bool
- func (pg *PgDb) ExchangeTickTableName() string
- func (pg *PgDb) ExchangeTicksChartData(ctx context.Context, selectedTick string, currencyPair string, ...) ([]ticks.TickChartData, error)
- func (pg *PgDb) FetchBlockForSync(ctx context.Context, blockHeight int64, offtset int, limit int) ([]mempool.Block, int64, error)
- func (pg *PgDb) FetchExchangeForSync(ctx context.Context, lastID int, skip, take int) ([]ticks.ExchangeData, int64, error)
- func (pg *PgDb) FetchExchangeTicks(ctx context.Context, currencyPair, name string, interval, offset, limit int) ([]ticks.TickDto, int64, error)
- func (pg *PgDb) FetchMempoolForSync(ctx context.Context, date time.Time, offtset int, limit int) ([]mempool.Mempool, int64, error)
- func (pg *PgDb) FetchNodeLocations(ctx context.Context, offset, limit int) ([]netsnapshot.CountryInfo, int64, error)
- func (pg *PgDb) FetchNodeVersion(ctx context.Context, offset, limit int) ([]netsnapshot.UserAgentInfo, int64, error)
- func (pg *PgDb) FetchPowChartData(ctx context.Context, source string, dataType string) (records []pow.PowChartData, err error)
- func (pg *PgDb) FetchPowData(ctx context.Context, offset, limit int) ([]pow.PowDataDto, int64, error)
- func (pg *PgDb) FetchPowDataBySource(ctx context.Context, source string, offset, limit int) ([]pow.PowDataDto, int64, error)
- func (pg *PgDb) FetchPowDataForSync(ctx context.Context, date int64, skip, take int) ([]pow.PowData, int64, error)
- func (pg *PgDb) FetchPowSourceData(ctx context.Context) ([]pow.PowDataSource, error)
- func (pg *PgDb) FetchVSPs(ctx context.Context) ([]vsp.VSPDto, error)
- func (pg *PgDb) FetchVoteForSync(ctx context.Context, date time.Time, offtset int, limit int) ([]mempool.Vote, int64, error)
- func (pg *PgDb) FetchVspSourcesForSync(ctx context.Context, lastID int64, skip, take int) ([]vsp.VSPDto, int64, error)
- func (pg *PgDb) FetchVspTicksForSync(ctx context.Context, lastID int64, skip, take int) ([]datasync.VSPTickSyncDto, int64, error)
- func (pg *PgDb) FilteredVSPTicks(ctx context.Context, vspName string, offset, limit int) ([]vsp.VSPTickDto, int64, error)
- func (pg PgDb) FindNetworkSnapshot(ctx context.Context, timestamp int64) (*netsnapshot.SnapShot, error)
- func (pg PgDb) GetAvailableNodes(ctx context.Context) ([]net.IP, error)
- func (pg PgDb) GetIPLocation(ctx context.Context, ip string) (string, int, error)
- func (pg *PgDb) GetPowDistinctDates(ctx context.Context, sources []string) ([]time.Time, error)
- func (pg *PgDb) GithubStat(ctx context.Context, repository string, offtset int, limit int) ([]commstats.Github, error)
- func (pg *PgDb) GithubTableExits() bool
- func (pg *PgDb) HeartbeatTableExists() bool
- func (pg *PgDb) LastCommStatEntry() (entryTime time.Time)
- func (pg *PgDb) LastEntry(ctx context.Context, tableName string, receiver interface{}) error
- func (pg *PgDb) LastExchangeEntryID() (id int64)
- func (pg *PgDb) LastExchangeTickEntryTime() (time time.Time)
- func (pg *PgDb) LastMempoolBlockHeight() (height int64, err error)
- func (pg *PgDb) LastMempoolTime() (entryTime time.Time, err error)
- func (pg *PgDb) LastPowEntryTime(source string) (time int64)
- func (pg PgDb) LastSnapshot(ctx context.Context) (*netsnapshot.SnapShot, error)
- func (pg PgDb) LastSnapshotTime(ctx context.Context) (timestamp int64)
- func (pg *PgDb) LastVspTickEntryTime() (time time.Time)
- func (pg *PgDb) MempoolBinDataTableExits() bool
- func (pg *PgDb) MempoolCount(ctx context.Context) (int64, error)
- func (pg *PgDb) MempoolDataTableExits() bool
- func (pg PgDb) MempoolTableName() string
- func (pg *PgDb) Mempools(ctx context.Context, offtset int, limit int) ([]mempool.Dto, error)
- func (pg *PgDb) NetworkNodeTableExists() bool
- func (pg PgDb) NetworkPeer(ctx context.Context, address string) (*netsnapshot.NetworkPeer, error)
- func (pg PgDb) NetworkPeers(ctx context.Context, timestamp int64, q string, offset int, limit int) ([]netsnapshot.NetworkPeer, int64, error)
- func (pg *PgDb) NetworkSnapshotBinTableExists() bool
- func (pg *PgDb) NetworkSnapshotTableExists() bool
- func (pg PgDb) NextSnapshot(ctx context.Context, timestamp int64) (*netsnapshot.SnapShot, error)
- func (pg PgDb) NodeExists(ctx context.Context, address string) (bool, error)
- func (pg *PgDb) NodeLocationTableExists() bool
- func (pg *PgDb) NodeVersionTableExists() bool
- func (pg PgDb) PeerCountByCountries(ctx context.Context, sources string, offset, limit int) ([]netsnapshot.CountryInfo, int64, error)
- func (pg PgDb) PeerCountByIPVersion(ctx context.Context, timestamp int64, iPVersion int) (int64, error)
- func (pg PgDb) PeerCountByUserAgents(ctx context.Context, sources string, offset, limit int) ([]netsnapshot.UserAgentInfo, int64, error)
- func (pg *PgDb) PowBInTableExits() bool
- func (pg *PgDb) PowCount(ctx context.Context) (int64, error)
- func (pg *PgDb) PowDataTableExits() bool
- func (pg *PgDb) PowTableName() string
- func (pg PgDb) PreviousSnapshot(ctx context.Context, timestamp int64) (*netsnapshot.SnapShot, error)
- func (pg *PgDb) PropagationTableExists() bool
- func (pg PgDb) RecordNodeConnectionFailure(ctx context.Context, address string, maxAllowedFailure int) error
- func (pg *PgDb) RedditStats(ctx context.Context, subreddit string, offtset int, limit int) ([]commstats.Reddit, error)
- func (pg *PgDb) RedditTableExits() bool
- func (pg *PgDb) RegisterCharts(charts *cache.Manager, syncSources []string, ...)
- func (pg *PgDb) RegisterExchange(ctx context.Context, exchange ticks.ExchangeData) (time.Time, time.Time, time.Time, error)
- func (pg *PgDb) SaveBlock(ctx context.Context, block mempool.Block) error
- func (pg *PgDb) SaveBlockFromSync(ctx context.Context, block interface{}) error
- func (pg *PgDb) SaveExchangeFromSync(ctx context.Context, exchangeData interface{}) error
- func (pg *PgDb) SaveExchangeTickFromSync(ctx context.Context, tickData interface{}) error
- func (pg PgDb) SaveHeartbeat(ctx context.Context, heartbeat netsnapshot.Heartbeat) error
- func (pg PgDb) SaveNode(ctx context.Context, peer netsnapshot.NetworkPeer) error
- func (pg PgDb) SaveSnapshot(ctx context.Context, snapshot netsnapshot.SnapShot) error
- func (pg *PgDb) SaveVote(ctx context.Context, vote mempool.Vote) error
- func (pg *PgDb) SaveVoteFromSync(ctx context.Context, voteData interface{}) error
- func (pg PgDb) SeenNodesByTimestamp(ctx context.Context) ([]netsnapshot.NodeCount, error)
- func (pg PgDb) SnapshotCount(ctx context.Context) (int64, error)
- func (pg PgDb) Snapshots(ctx context.Context, offset, limit int, forChart bool) ([]netsnapshot.SnapShot, int64, error)
- func (pg PgDb) SnapshotsByTime(ctx context.Context, startDate int64, pageSize int) ([]netsnapshot.SnapShot, error)
- func (pg *PgDb) StoreExchangeTicks(ctx context.Context, name string, interval int, pair string, ...) (time.Time, error)
- func (pg *PgDb) StoreGithubStat(ctx context.Context, github commstats.Github) error
- func (pg PgDb) StoreMempool(ctx context.Context, mempoolDto mempool.Mempool) error
- func (pg PgDb) StoreMempoolFromSync(ctx context.Context, mempoolDto interface{}) error
- func (pg *PgDb) StoreRedditStat(ctx context.Context, stat commstats.Reddit) error
- func (pg *PgDb) StoreTwitterStat(ctx context.Context, twitter commstats.Twitter) error
- func (pg *PgDb) StoreVSPs(ctx context.Context, data vsp.Response) (int, []error)
- func (pg *PgDb) StoreYoutubeStat(ctx context.Context, youtube commstats.Youtube) error
- func (pg *PgDb) TableNames() []string
- func (pg *PgDb) TickIntervalsByExchangeAndPair(ctx context.Context, exchangeName string, currencyPair string) ([]ticks.TickDtoInterval, error)
- func (pg PgDb) TotalPeerCount(ctx context.Context, timestamp int64) (int64, error)
- func (pg *PgDb) TwitterStats(ctx context.Context, handle string, offtset int, limit int) ([]commstats.Twitter, error)
- func (pg *PgDb) TwitterTableExits() bool
- func (pg *PgDb) UpdateBlockBinData(ctx context.Context) error
- func (pg PgDb) UpdateMempoolAggregateData(ctx context.Context) error
- func (pg PgDb) UpdateNode(ctx context.Context, peer netsnapshot.NetworkPeer) error
- func (pg *PgDb) UpdateNodeLocation(ctx context.Context) error
- func (pg *PgDb) UpdateNodeVersion(ctx context.Context) error
- func (pg *PgDb) UpdatePowChart(ctx context.Context) error
- func (pg PgDb) UpdatePropagationData(ctx context.Context) error
- func (pg *PgDb) UpdateSnapshotNodesBin(ctx context.Context) error
- func (pg *PgDb) UpdateVoteTimeDeviationData(ctx context.Context) error
- func (pg *PgDb) UpdateVspChart(ctx context.Context) error
- func (pg *PgDb) UpdateVspDailyChart(ctx context.Context) error
- func (pg *PgDb) UpdateVspHourlyChart(ctx context.Context) error
- func (pg *PgDb) VSPInfoTableExits() bool
- func (pg *PgDb) VSPTickBinTableExits() bool
- func (pg *PgDb) VSPTickTableExits() bool
- func (pg *PgDb) VoteReceiveTimeDeviationTableExits() bool
- func (pg *PgDb) VoteTableExits() bool
- func (pg PgDb) VoteTableName() string
- func (pg *PgDb) Votes(ctx context.Context, offset int, limit int) ([]mempool.VoteDto, error)
- func (pg *PgDb) VotesByBlock(ctx context.Context, blockHash string) ([]mempool.VoteDto, error)
- func (pg *PgDb) VotesCount(ctx context.Context) (int64, error)
- func (pg *PgDb) VspTableName() string
- func (pg *PgDb) VspTickCount(ctx context.Context) (int64, error)
- func (pg *PgDb) VspTickTableName() string
- func (pg *PgDb) YoutubeStat(ctx context.Context, channel string, offtset int, limit int) ([]commstats.Youtube, error)
- func (pg *PgDb) YoutubeTableExits() bool
Constants ¶
This section is empty.
Variables ¶
var (
ErrNonConsecutiveTicks = errors.New("postgres/exchanges: Non consecutive exchange ticks")
)
Functions ¶
func Connect ¶
Connect opens a connection to a PostgreSQL database. The caller is responsible for calling Close() on the returned db when finished using it. The input host may be an IP address for TCP connection, or an absolute path to a UNIX domain socket. An empty string should be provided for UNIX sockets.
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
func RoundValue ¶
func UnixTimeToString ¶
Types ¶
type PgDb ¶
type PgDb struct {
// contains filtered or unexported fields
}
func (*PgDb) AddPowDataFromSync ¶
func (*PgDb) AddVspSourceFromSync ¶
func (*PgDb) AddVspTicksFromSync ¶
func (*PgDb) AllExchange ¶
AllExchange fetches a slice of all exchange from the db
func (*PgDb) AllExchangeTicks ¶
func (pg *PgDb) AllExchangeTicks(ctx context.Context, currencyPair string, interval, offset, limit int) ([]ticks.TickDto, int64, error)
FetchExchangeTicks fetches a slice exchange ticks of the supplied exchange name
func (*PgDb) AllExchangeTicksCurrencyPair ¶
func (*PgDb) AllExchangeTicksInterval ¶
func (PgDb) AllNodeContries ¶
func (PgDb) AllNodeVersions ¶
func (*PgDb) AllVSPTicks ¶
func (pg *PgDb) AllVSPTicks(ctx context.Context, offset, limit int) ([]vsp.VSPTickDto, int64, error)
VSPTicks
func (PgDb) AttemptPeer ¶
func (PgDb) AverageLatency ¶
func (*PgDb) BlockBinTableExits ¶
func (*PgDb) BlockTableExits ¶
func (PgDb) BlockTableName ¶
func (*PgDb) BlocksWithoutVotes ¶
func (*PgDb) CommunityChart ¶
func (*PgDb) CountGithubStat ¶
func (*PgDb) CountRedditStat ¶
func (*PgDb) CountTwitterStat ¶
func (*PgDb) CountYoutubeStat ¶
func (*PgDb) CreateExchangeTable ¶
func (*PgDb) CreateExchangeTickIndex ¶
func (*PgDb) CreateExchangeTickTable ¶
func (*PgDb) CreateMempoolDataTable ¶
func (*PgDb) CreateMempoolDayBinTable ¶
func (*PgDb) CreateNetworkSnapshotBinTable ¶
network_snapshot_bin
func (*PgDb) CreateNetworkSnapshotTable ¶
network snapshot
func (*PgDb) CreateNodeLocationTable ¶
node_location
func (*PgDb) CreatePowBinTable ¶
func (*PgDb) CreatePowDataTable ¶
func (*PgDb) CreatePropagationTable ¶
func (*PgDb) CreateVSPInfoTables ¶
func (*PgDb) CreateVSPTickBinTable ¶
func (*PgDb) CreateVSPTickIndex ¶
func (*PgDb) CreateVSPTickTables ¶
func (*PgDb) CreateVoteReceiveTimeDeviationTable ¶
vote_receive_time_deviation table
func (*PgDb) CurrencyPairByExchange ¶
func (*PgDb) DropAllTables ¶
func (*PgDb) DropCacheTables ¶
func (*PgDb) ExchangeTableExits ¶
func (*PgDb) ExchangeTableName ¶
func (*PgDb) ExchangeTickCount ¶
func (*PgDb) ExchangeTickTableExits ¶
func (*PgDb) ExchangeTickTableName ¶
func (*PgDb) ExchangeTicksChartData ¶
func (*PgDb) FetchBlockForSync ¶
func (*PgDb) FetchExchangeForSync ¶
func (*PgDb) FetchExchangeTicks ¶
func (pg *PgDb) FetchExchangeTicks(ctx context.Context, currencyPair, name string, interval, offset, limit int) ([]ticks.TickDto, int64, error)
FetchExchangeTicks fetches a slice exchange ticks of the supplied exchange name
func (*PgDb) FetchMempoolForSync ¶
func (*PgDb) FetchNodeLocations ¶
func (pg *PgDb) FetchNodeLocations(ctx context.Context, offset, limit int) ([]netsnapshot.CountryInfo, int64, error)
func (*PgDb) FetchNodeVersion ¶
func (pg *PgDb) FetchNodeVersion(ctx context.Context, offset, limit int) ([]netsnapshot.UserAgentInfo, int64, error)
func (*PgDb) FetchPowChartData ¶
func (*PgDb) FetchPowData ¶
func (*PgDb) FetchPowDataBySource ¶
func (*PgDb) FetchPowDataForSync ¶
func (pg *PgDb) FetchPowDataForSync(ctx context.Context, date int64, skip, take int) ([]pow.PowData, int64, error)
FetchPowDataForSync returns PoW data for the sync operation
func (*PgDb) FetchPowSourceData ¶
func (*PgDb) FetchVoteForSync ¶
func (*PgDb) FetchVspSourcesForSync ¶
func (*PgDb) FetchVspTicksForSync ¶
func (pg *PgDb) FetchVspTicksForSync(ctx context.Context, lastID int64, skip, take int) ([]datasync.VSPTickSyncDto, int64, error)
VSPTicks
func (*PgDb) FilteredVSPTicks ¶
func (PgDb) FindNetworkSnapshot ¶
func (PgDb) GetAvailableNodes ¶
func (PgDb) GetIPLocation ¶
func (*PgDb) GetPowDistinctDates ¶
func (*PgDb) GithubStat ¶
func (*PgDb) GithubTableExits ¶
func (*PgDb) HeartbeatTableExists ¶
func (*PgDb) LastCommStatEntry ¶
func (*PgDb) LastExchangeEntryID ¶
LastExchangeTickEntryTime
func (*PgDb) LastExchangeTickEntryTime ¶
LastExchangeTickEntryTime
func (*PgDb) LastMempoolBlockHeight ¶
func (*PgDb) LastPowEntryTime ¶
func (PgDb) LastSnapshot ¶
func (PgDb) LastSnapshotTime ¶
func (*PgDb) LastVspTickEntryTime ¶
func (*PgDb) MempoolBinDataTableExits ¶
func (*PgDb) MempoolDataTableExits ¶
func (PgDb) MempoolTableName ¶
func (*PgDb) NetworkNodeTableExists ¶
func (PgDb) NetworkPeer ¶
func (pg PgDb) NetworkPeer(ctx context.Context, address string) (*netsnapshot.NetworkPeer, error)
func (PgDb) NetworkPeers ¶
func (*PgDb) NetworkSnapshotBinTableExists ¶
func (*PgDb) NetworkSnapshotTableExists ¶
func (PgDb) NextSnapshot ¶
func (PgDb) NodeExists ¶
func (*PgDb) NodeLocationTableExists ¶
func (*PgDb) NodeVersionTableExists ¶
func (PgDb) PeerCountByCountries ¶
func (pg PgDb) PeerCountByCountries(ctx context.Context, sources string, offset, limit int) ([]netsnapshot.CountryInfo, int64, error)
func (PgDb) PeerCountByIPVersion ¶
func (PgDb) PeerCountByUserAgents ¶
func (pg PgDb) PeerCountByUserAgents(ctx context.Context, sources string, offset, limit int) ([]netsnapshot.UserAgentInfo, int64, error)
func (*PgDb) PowBInTableExits ¶
func (*PgDb) PowDataTableExits ¶
func (*PgDb) PowTableName ¶
func (PgDb) PreviousSnapshot ¶
func (*PgDb) PropagationTableExists ¶
func (PgDb) RecordNodeConnectionFailure ¶
func (pg PgDb) RecordNodeConnectionFailure(ctx context.Context, address string, maxAllowedFailure int) error
RecordNodeConnectionFailure increase the number of failare for the specified node
The node will be marked as dead if the maxAllowedFailure is reached
func (*PgDb) RedditStats ¶
func (*PgDb) RedditTableExits ¶
func (*PgDb) RegisterCharts ¶
func (*PgDb) RegisterExchange ¶
func (*PgDb) SaveBlockFromSync ¶
func (*PgDb) SaveExchangeFromSync ¶
func (*PgDb) SaveExchangeTickFromSync ¶
func (PgDb) SaveHeartbeat ¶
func (PgDb) SaveNode ¶
func (pg PgDb) SaveNode(ctx context.Context, peer netsnapshot.NetworkPeer) error
SaveNode inserts the new node information. The node is marked as alive by default
func (PgDb) SaveSnapshot ¶
func (*PgDb) SaveVoteFromSync ¶
func (PgDb) SeenNodesByTimestamp ¶
func (PgDb) SnapshotsByTime ¶
func (*PgDb) StoreExchangeTicks ¶
func (pg *PgDb) StoreExchangeTicks(ctx context.Context, name string, interval int, pair string, ticks []ticks.Tick) (time.Time, error)
StoreExchangeTicks
func (*PgDb) StoreGithubStat ¶
github
func (PgDb) StoreMempool ¶
func (PgDb) StoreMempoolFromSync ¶
func (*PgDb) StoreRedditStat ¶
func (*PgDb) StoreTwitterStat ¶
func (*PgDb) StoreVSPs ¶
StoreVSPs attempts to store the vsp responses by calling storeVspResponseG and returning a slice of errors
func (*PgDb) StoreYoutubeStat ¶
youtube
func (*PgDb) TableNames ¶
func (*PgDb) TickIntervalsByExchangeAndPair ¶
func (PgDb) TotalPeerCount ¶
func (*PgDb) TwitterStats ¶
func (*PgDb) TwitterTableExits ¶
func (*PgDb) UpdateBlockBinData ¶
UpdateBlockBinData
func (PgDb) UpdateMempoolAggregateData ¶
func (PgDb) UpdateNode ¶
func (pg PgDb) UpdateNode(ctx context.Context, peer netsnapshot.NetworkPeer) error
UpdateNode updates the node information in the database
It reset the node's failure count and marks it as alive
func (PgDb) UpdatePropagationData ¶
UpdatePropagationData
func (*PgDb) UpdateSnapshotNodesBin ¶
func (*PgDb) UpdateVoteTimeDeviationData ¶
UpdateVoteTimeDeviationData