Documentation ¶
Index ¶
- Constants
- func ParallelCopyTxsToDB(transactions interface{}, tableName string) error
- type Buffer
- func (b *Buffer) ClearBuffer(dataType string)
- func (b *Buffer) GetBufferSize(dataType string) int
- func (b *Buffer) GetData(dataType string) (map[string]interface{}, error)
- func (b *Buffer) InsertData(key string, height int64, data interface{}, notify bool) error
- func (b *Buffer) SetSyncFunc(cb SyncCB)
- func (b *Buffer) Start()
- func (b *Buffer) Stop()
- type BufferMetrics
- type Config
- type SyncCB
- type SyncResult
Constants ¶
View Source
const DefaultSyncPeriod = 30 * time.Second
Variables ¶
This section is empty.
Functions ¶
func ParallelCopyTxsToDB ¶
Types ¶
type Buffer ¶
type Buffer struct { SyncComplete chan SyncResult // contains filtered or unexported fields }
func (*Buffer) ClearBuffer ¶
func (*Buffer) GetBufferSize ¶
func (*Buffer) InsertData ¶
InsertData inserts 'data' into the buffer under the key 'key' if notify is set to true, the condition 'SyncBlockThreshold' will be tested for that specific key
func (*Buffer) SetSyncFunc ¶
SetSyncFunc sets the syncing callback function
type BufferMetrics ¶
type BufferMetrics struct {
// contains filtered or unexported fields
}
type SyncCB ¶
type SyncCB func() SyncResult
type SyncResult ¶
Click to show internal directories.
Click to hide internal directories.