Documentation
¶
Index ¶
- Constants
- type Handler
- type PGSink
- func (s *PGSink) LoadCursor(ctx context.Context, chainId string) (blockNum uint64, blockHash string, err error)
- func (s *PGSink) Migrate(ctx context.Context, sqlString string) error
- func (s *PGSink) MigrateWithFile(ctx context.Context, filePath string) error
- func (s *PGSink) Rollback(ctx context.Context, chainId string, toBlock uint64, blockHash string) (err error)
- func (s *PGSink) Store(ctx context.Context, events []types.Event) (err error)
- func (s *PGSink) UpdateCursor(ctx context.Context, chainId string, newBlock uint64, blockHash string) error
- type SinkConfig
Constants ¶
View Source
const (
// threshold to switch to COPY for bulk inserting
DefaultCopyThreshold = 32
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PGSink ¶
type PGSink struct {
// contains filtered or unexported fields
}
func NewSink ¶
func NewSink(cfg SinkConfig) (*PGSink, error)
func (*PGSink) LoadCursor ¶
func (*PGSink) MigrateWithFile ¶
Click to show internal directories.
Click to hide internal directories.