Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRetryable = errors.New("retryable replication error")
ErrRetryable is a custom error to retry the logic when returned.
Functions ¶
func WTSetToCSM ¶
func WTSetToCSM(wtSet *wal.WTSet) (io.ColumnSeriesMap, error)
WTSetToCSM converts wal.WTSet to ColumnSeriesMap.
Types ¶
type GRPCClient ¶
GRPCClient is an interface to abstract GRPCReplicationClient.
type GRPCReplicationClient ¶
type GRPCReplicationClient struct { Client pb.ReplicationClient // contains filtered or unexported fields }
func NewGRPCReplicationClient ¶
func NewGRPCReplicationClient(client pb.ReplicationClient) *GRPCReplicationClient
func (*GRPCReplicationClient) Connect ¶
func (rc *GRPCReplicationClient) Connect(ctx context.Context) error
func (*GRPCReplicationClient) Recv ¶
func (rc *GRPCReplicationClient) Recv() ([]byte, error)
Recv blocks until it receives a response from gRPC stream connection.
type GRPCReplicationServer ¶
type GRPCReplicationServer struct { pb.UnimplementedReplicationServer CertFile string CertKeyFile string // Key: IPAddr (e.g. "192.125.18.1:25"), Value: channel for messages sent to each gRPC stream StreamChannels map[string]chan []byte }
func NewGRPCReplicationServer ¶ added in v4.1.18
func NewGRPCReplicationServer() *GRPCReplicationServer
func (*GRPCReplicationServer) GetWALStream ¶
func (rs *GRPCReplicationServer) GetWALStream(_ *pb.GetWALStreamRequest, stream pb.Replication_GetWALStreamServer, ) error
func (*GRPCReplicationServer) SendReplicationMessage ¶
func (rs *GRPCReplicationServer) SendReplicationMessage(transactionGroup []byte)
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
func NewReceiver ¶
func NewReceiver(grpcClient GRPCClient, replayer Replayer) *Receiver
type ReplayerImpl ¶
type ReplayerImpl struct {
// contains filtered or unexported fields
}
func NewReplayer ¶
func (*ReplayerImpl) Replay ¶
func (r *ReplayerImpl) Replay(transactionGroup []byte) error
type Retryer ¶ added in v4.1.13
type Retryer struct {
// contains filtered or unexported fields
}
func NewRetryer ¶ added in v4.1.1
Source Files ¶
Click to show internal directories.
Click to hide internal directories.