streamer

package
v0.0.0-...-3728298 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMetrics

func RegisterMetrics()

RegisterMetrics registers the Prometheus metrics.

Types

type GrpcStreamer

type GrpcStreamer struct {
	v1.UnimplementedWalStreamerServiceServer
	// contains filtered or unexported fields
}

GrpcStreamer implements gRPC-based WalStreamerService.

func NewGrpcStreamer

func NewGrpcStreamer(errGrp *errgroup.Group, storageEngines map[string]*dbkernel.Engine, dynamicTimeout time.Duration) *GrpcStreamer

NewGrpcStreamer returns an initialized GrpcStreamer that implements grpc-based WalStreamerService.

func (*GrpcStreamer) GetLatestOffset

GetLatestOffset returns the latest wal offset of the wal for the provided namespace.

func (*GrpcStreamer) StreamWalRecords

StreamWalRecords stream the underlying WAL record on the connection stream.

type GrpcStreamerClient

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

func NewGrpcStreamerClient

func NewGrpcStreamerClient(gcc *grpc.ClientConn, namespace string, wIO WalIO, offset []byte) *GrpcStreamerClient

func (*GrpcStreamerClient) GetLatestOffset

func (c *GrpcStreamerClient) GetLatestOffset(ctx context.Context) (*dbkernel.Offset, error)

GetLatestOffset returns the latest offset for the provided namespace that upstream has seen.

func (*GrpcStreamerClient) StreamWAL

func (c *GrpcStreamerClient) StreamWAL(ctx context.Context) error

StreamWAL start the wal Streaming for the namespace from the upstream.

type WalIO

type WalIO interface {
	Write(data *v1.WALRecord) error
}

WalIO provide.

Jump to

Keyboard shortcuts

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