app

package
v0.0.1-beta-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2023 License: MIT, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasinProvider

type BasinProvider interface {
	Create(context.Context, string, string, basincapnp.Schema, common.Address) (bool, error)
	Push(context.Context, string, string, basincapnp.Tx, []byte) error
	Reconnect() error
}

BasinProvider ...

type BasinProviderUploader

type BasinProviderUploader interface {
	Upload(context.Context, string, string, uint64, io.Reader, *Signer, io.Writer) error
}

BasinProviderUploader ...

type BasinStreamer

type BasinStreamer struct {
	// contains filtered or unexported fields
}

BasinStreamer contains logic of streaming Postgres changes to Basin Provider.

func NewBasinStreamer

func NewBasinStreamer(ns string, r Replicator, bp BasinProvider, pk *ecdsa.PrivateKey) *BasinStreamer

NewBasinStreamer creates new streamer.

func (*BasinStreamer) Run

func (b *BasinStreamer) Run(ctx context.Context) error

Run runs the BasinStreamer logic.

type BasinUploader

type BasinUploader struct {
	// contains filtered or unexported fields
}

BasinUploader contains logic of uploading Parquet files to Basin Provider.

func NewBasinUploader

func NewBasinUploader(ns string, rel string, bp BasinProviderUploader, pk *ecdsa.PrivateKey) *BasinUploader

NewBasinUploader creates new uploader.

func (*BasinUploader) Upload

func (bu *BasinUploader) Upload(ctx context.Context, filepath string, progress io.Writer) error

Upload sends file to provider for upload.

type Replicator

type Replicator interface {
	StartReplication(ctx context.Context) (chan *pgrepl.Tx, string, error)
	Commit(ctx context.Context, lsn pglogrepl.LSN) error
	Shutdown()
}

Replicator replicates Postgres txs into a channel.

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

Signer allows you to sign a big stream of bytes by calling Sum multiple times, then Sign.

func NewSigner

func NewSigner(pk *ecdsa.PrivateKey) *Signer

NewSigner creates a new signer.

func (*Signer) Sign

func (s *Signer) Sign() ([]byte, error)

Sign signs the internal state.

func (*Signer) Sum

func (s *Signer) Sum(chunk []byte)

Sum updates the hash state with a new chunk.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL