Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterReplicationServer(s grpc.ServiceRegistrar, srv ReplicationServer)
- type BackfillDownstream
- func (*BackfillDownstream) Descriptor() ([]byte, []int)deprecated
- func (x *BackfillDownstream) GetContinuousThrough() uint64
- func (x *BackfillDownstream) GetRemaining() []*SeqRange
- func (*BackfillDownstream) ProtoMessage()
- func (x *BackfillDownstream) ProtoReflect() protoreflect.Message
- func (x *BackfillDownstream) Reset()
- func (x *BackfillDownstream) String() string
- type BackfillUpstream
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (x *Block) GetBaseSeq() uint64
- func (x *Block) GetBaseTimeUs() int64
- func (x *Block) GetBlockSize() uint32
- func (x *Block) GetCompressed() bool
- func (x *Block) GetData() []byte
- func (x *Block) GetFrameCount() uint32
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- type HandshakeRequest
- func (*HandshakeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HandshakeRequest) GetHeadSeq() uint64
- func (x *HandshakeRequest) GetInstanceId() string
- func (x *HandshakeRequest) GetJournalBytes() uint64
- func (*HandshakeRequest) ProtoMessage()
- func (x *HandshakeRequest) ProtoReflect() protoreflect.Message
- func (x *HandshakeRequest) Reset()
- func (x *HandshakeRequest) String() string
- type HandshakeResponse
- func (*HandshakeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HandshakeResponse) GetCursor() uint64
- func (x *HandshakeResponse) GetHoles() []*SeqRange
- func (x *HandshakeResponse) GetLiveStartFrom() uint64
- func (*HandshakeResponse) ProtoMessage()
- func (x *HandshakeResponse) ProtoReflect() protoreflect.Message
- func (x *HandshakeResponse) Reset()
- func (x *HandshakeResponse) String() string
- type LiveDownstream
- type LiveFrame
- func (*LiveFrame) Descriptor() ([]byte, []int)deprecated
- func (x *LiveFrame) GetCanId() uint32
- func (x *LiveFrame) GetData() []byte
- func (x *LiveFrame) GetSeq() uint64
- func (x *LiveFrame) GetTimestampUs() int64
- func (*LiveFrame) ProtoMessage()
- func (x *LiveFrame) ProtoReflect() protoreflect.Message
- func (x *LiveFrame) Reset()
- func (x *LiveFrame) String() string
- type LiveStatus
- func (*LiveStatus) Descriptor() ([]byte, []int)deprecated
- func (x *LiveStatus) GetHeadSeq() uint64
- func (x *LiveStatus) GetJournalBytes() uint64
- func (*LiveStatus) ProtoMessage()
- func (x *LiveStatus) ProtoReflect() protoreflect.Message
- func (x *LiveStatus) Reset()
- func (x *LiveStatus) String() string
- type LiveUpstream
- func (*LiveUpstream) Descriptor() ([]byte, []int)deprecated
- func (x *LiveUpstream) GetFrame() *LiveFrame
- func (x *LiveUpstream) GetMsg() isLiveUpstream_Msg
- func (x *LiveUpstream) GetStatus() *LiveStatus
- func (*LiveUpstream) ProtoMessage()
- func (x *LiveUpstream) ProtoReflect() protoreflect.Message
- func (x *LiveUpstream) Reset()
- func (x *LiveUpstream) String() string
- type LiveUpstream_Frame
- type LiveUpstream_Status
- type ReplicationClient
- type ReplicationServer
- type Replication_BackfillClient
- type Replication_BackfillServer
- type Replication_LiveClient
- type Replication_LiveServer
- type SeqRange
- type UnimplementedReplicationServer
- func (UnimplementedReplicationServer) Backfill(grpc.BidiStreamingServer[BackfillUpstream, BackfillDownstream]) error
- func (UnimplementedReplicationServer) Handshake(context.Context, *HandshakeRequest) (*HandshakeResponse, error)
- func (UnimplementedReplicationServer) Live(grpc.BidiStreamingServer[LiveUpstream, LiveDownstream]) error
- type UnsafeReplicationServer
Constants ¶
const ( Replication_Handshake_FullMethodName = "/lplex.replication.v1.Replication/Handshake" Replication_Live_FullMethodName = "/lplex.replication.v1.Replication/Live" Replication_Backfill_FullMethodName = "/lplex.replication.v1.Replication/Backfill" )
Variables ¶
var File_proto_replication_v1_replication_proto protoreflect.FileDescriptor
var Replication_ServiceDesc = grpc.ServiceDesc{ ServiceName: "lplex.replication.v1.Replication", HandlerType: (*ReplicationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Handshake", Handler: _Replication_Handshake_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Live", Handler: _Replication_Live_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Backfill", Handler: _Replication_Backfill_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/replication/v1/replication.proto", }
Replication_ServiceDesc is the grpc.ServiceDesc for Replication service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterReplicationServer ¶
func RegisterReplicationServer(s grpc.ServiceRegistrar, srv ReplicationServer)
Types ¶
type BackfillDownstream ¶
type BackfillDownstream struct {
ContinuousThrough uint64 `protobuf:"varint,1,opt,name=continuous_through,json=continuousThrough,proto3" json:"continuous_through,omitempty"` // contiguous data now extends through this seq
Remaining []*SeqRange `protobuf:"bytes,2,rep,name=remaining,proto3" json:"remaining,omitempty"` // holes still unfilled
// contains filtered or unexported fields
}
func (*BackfillDownstream) Descriptor
deprecated
func (*BackfillDownstream) Descriptor() ([]byte, []int)
Deprecated: Use BackfillDownstream.ProtoReflect.Descriptor instead.
func (*BackfillDownstream) GetContinuousThrough ¶
func (x *BackfillDownstream) GetContinuousThrough() uint64
func (*BackfillDownstream) GetRemaining ¶
func (x *BackfillDownstream) GetRemaining() []*SeqRange
func (*BackfillDownstream) ProtoMessage ¶
func (*BackfillDownstream) ProtoMessage()
func (*BackfillDownstream) ProtoReflect ¶
func (x *BackfillDownstream) ProtoReflect() protoreflect.Message
func (*BackfillDownstream) Reset ¶
func (x *BackfillDownstream) Reset()
func (*BackfillDownstream) String ¶
func (x *BackfillDownstream) String() string
type BackfillUpstream ¶
type BackfillUpstream struct {
Block *Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
// contains filtered or unexported fields
}
func (*BackfillUpstream) Descriptor
deprecated
func (*BackfillUpstream) Descriptor() ([]byte, []int)
Deprecated: Use BackfillUpstream.ProtoReflect.Descriptor instead.
func (*BackfillUpstream) GetBlock ¶
func (x *BackfillUpstream) GetBlock() *Block
func (*BackfillUpstream) ProtoMessage ¶
func (*BackfillUpstream) ProtoMessage()
func (*BackfillUpstream) ProtoReflect ¶
func (x *BackfillUpstream) ProtoReflect() protoreflect.Message
func (*BackfillUpstream) Reset ¶
func (x *BackfillUpstream) Reset()
func (*BackfillUpstream) String ¶
func (x *BackfillUpstream) String() string
type Block ¶
type Block struct {
BaseSeq uint64 `protobuf:"varint,1,opt,name=base_seq,json=baseSeq,proto3" json:"base_seq,omitempty"`
BaseTimeUs int64 `protobuf:"varint,2,opt,name=base_time_us,json=baseTimeUs,proto3" json:"base_time_us,omitempty"`
FrameCount uint32 `protobuf:"varint,3,opt,name=frame_count,json=frameCount,proto3" json:"frame_count,omitempty"`
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // raw block bytes (compressed per journal format, passthrough)
Compressed bool `protobuf:"varint,5,opt,name=compressed,proto3" json:"compressed,omitempty"`
BlockSize uint32 `protobuf:"varint,6,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` // uncompressed block size (needed to write valid journal files)
// contains filtered or unexported fields
}
func (*Block) Descriptor
deprecated
func (*Block) GetBaseSeq ¶
func (*Block) GetBaseTimeUs ¶
func (*Block) GetBlockSize ¶
func (*Block) GetCompressed ¶
func (*Block) GetFrameCount ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type HandshakeRequest ¶
type HandshakeRequest struct {
InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
HeadSeq uint64 `protobuf:"varint,2,opt,name=head_seq,json=headSeq,proto3" json:"head_seq,omitempty"` // boat's current head sequence
JournalBytes uint64 `protobuf:"varint,3,opt,name=journal_bytes,json=journalBytes,proto3" json:"journal_bytes,omitempty"` // total journal bytes on boat disk
// contains filtered or unexported fields
}
func (*HandshakeRequest) Descriptor
deprecated
func (*HandshakeRequest) Descriptor() ([]byte, []int)
Deprecated: Use HandshakeRequest.ProtoReflect.Descriptor instead.
func (*HandshakeRequest) GetHeadSeq ¶
func (x *HandshakeRequest) GetHeadSeq() uint64
func (*HandshakeRequest) GetInstanceId ¶
func (x *HandshakeRequest) GetInstanceId() string
func (*HandshakeRequest) GetJournalBytes ¶
func (x *HandshakeRequest) GetJournalBytes() uint64
func (*HandshakeRequest) ProtoMessage ¶
func (*HandshakeRequest) ProtoMessage()
func (*HandshakeRequest) ProtoReflect ¶
func (x *HandshakeRequest) ProtoReflect() protoreflect.Message
func (*HandshakeRequest) Reset ¶
func (x *HandshakeRequest) Reset()
func (*HandshakeRequest) String ¶
func (x *HandshakeRequest) String() string
type HandshakeResponse ¶
type HandshakeResponse struct {
Cursor uint64 `protobuf:"varint,1,opt,name=cursor,proto3" json:"cursor,omitempty"` // cloud has continuous data through this seq
Holes []*SeqRange `protobuf:"bytes,2,rep,name=holes,proto3" json:"holes,omitempty"` // gaps the cloud is missing
LiveStartFrom uint64 `protobuf:"varint,3,opt,name=live_start_from,json=liveStartFrom,proto3" json:"live_start_from,omitempty"` // seq to start live stream from
// contains filtered or unexported fields
}
func (*HandshakeResponse) Descriptor
deprecated
func (*HandshakeResponse) Descriptor() ([]byte, []int)
Deprecated: Use HandshakeResponse.ProtoReflect.Descriptor instead.
func (*HandshakeResponse) GetCursor ¶
func (x *HandshakeResponse) GetCursor() uint64
func (*HandshakeResponse) GetHoles ¶
func (x *HandshakeResponse) GetHoles() []*SeqRange
func (*HandshakeResponse) GetLiveStartFrom ¶
func (x *HandshakeResponse) GetLiveStartFrom() uint64
func (*HandshakeResponse) ProtoMessage ¶
func (*HandshakeResponse) ProtoMessage()
func (*HandshakeResponse) ProtoReflect ¶
func (x *HandshakeResponse) ProtoReflect() protoreflect.Message
func (*HandshakeResponse) Reset ¶
func (x *HandshakeResponse) Reset()
func (*HandshakeResponse) String ¶
func (x *HandshakeResponse) String() string
type LiveDownstream ¶
type LiveDownstream struct {
AckedThrough uint64 `protobuf:"varint,1,opt,name=acked_through,json=ackedThrough,proto3" json:"acked_through,omitempty"` // cloud has received live frames through this seq
// contains filtered or unexported fields
}
func (*LiveDownstream) Descriptor
deprecated
func (*LiveDownstream) Descriptor() ([]byte, []int)
Deprecated: Use LiveDownstream.ProtoReflect.Descriptor instead.
func (*LiveDownstream) GetAckedThrough ¶
func (x *LiveDownstream) GetAckedThrough() uint64
func (*LiveDownstream) ProtoMessage ¶
func (*LiveDownstream) ProtoMessage()
func (*LiveDownstream) ProtoReflect ¶
func (x *LiveDownstream) ProtoReflect() protoreflect.Message
func (*LiveDownstream) Reset ¶
func (x *LiveDownstream) Reset()
func (*LiveDownstream) String ¶
func (x *LiveDownstream) String() string
type LiveFrame ¶
type LiveFrame struct {
Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
TimestampUs int64 `protobuf:"varint,2,opt,name=timestamp_us,json=timestampUs,proto3" json:"timestamp_us,omitempty"`
CanId uint32 `protobuf:"varint,3,opt,name=can_id,json=canId,proto3" json:"can_id,omitempty"` // 29-bit extended CAN ID
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*LiveFrame) Descriptor
deprecated
func (*LiveFrame) GetTimestampUs ¶
func (*LiveFrame) ProtoMessage ¶
func (*LiveFrame) ProtoMessage()
func (*LiveFrame) ProtoReflect ¶
func (x *LiveFrame) ProtoReflect() protoreflect.Message
type LiveStatus ¶
type LiveStatus struct {
HeadSeq uint64 `protobuf:"varint,1,opt,name=head_seq,json=headSeq,proto3" json:"head_seq,omitempty"` // boat's latest sequence
JournalBytes uint64 `protobuf:"varint,2,opt,name=journal_bytes,json=journalBytes,proto3" json:"journal_bytes,omitempty"` // total journal bytes
// contains filtered or unexported fields
}
func (*LiveStatus) Descriptor
deprecated
func (*LiveStatus) Descriptor() ([]byte, []int)
Deprecated: Use LiveStatus.ProtoReflect.Descriptor instead.
func (*LiveStatus) GetHeadSeq ¶
func (x *LiveStatus) GetHeadSeq() uint64
func (*LiveStatus) GetJournalBytes ¶
func (x *LiveStatus) GetJournalBytes() uint64
func (*LiveStatus) ProtoMessage ¶
func (*LiveStatus) ProtoMessage()
func (*LiveStatus) ProtoReflect ¶
func (x *LiveStatus) ProtoReflect() protoreflect.Message
func (*LiveStatus) Reset ¶
func (x *LiveStatus) Reset()
func (*LiveStatus) String ¶
func (x *LiveStatus) String() string
type LiveUpstream ¶
type LiveUpstream struct {
// Types that are valid to be assigned to Msg:
//
// *LiveUpstream_Frame
// *LiveUpstream_Status
Msg isLiveUpstream_Msg `protobuf_oneof:"msg"`
// contains filtered or unexported fields
}
func (*LiveUpstream) Descriptor
deprecated
func (*LiveUpstream) Descriptor() ([]byte, []int)
Deprecated: Use LiveUpstream.ProtoReflect.Descriptor instead.
func (*LiveUpstream) GetFrame ¶
func (x *LiveUpstream) GetFrame() *LiveFrame
func (*LiveUpstream) GetMsg ¶
func (x *LiveUpstream) GetMsg() isLiveUpstream_Msg
func (*LiveUpstream) GetStatus ¶
func (x *LiveUpstream) GetStatus() *LiveStatus
func (*LiveUpstream) ProtoMessage ¶
func (*LiveUpstream) ProtoMessage()
func (*LiveUpstream) ProtoReflect ¶
func (x *LiveUpstream) ProtoReflect() protoreflect.Message
func (*LiveUpstream) Reset ¶
func (x *LiveUpstream) Reset()
func (*LiveUpstream) String ¶
func (x *LiveUpstream) String() string
type LiveUpstream_Frame ¶
type LiveUpstream_Frame struct {
Frame *LiveFrame `protobuf:"bytes,1,opt,name=frame,proto3,oneof"`
}
type LiveUpstream_Status ¶
type LiveUpstream_Status struct {
Status *LiveStatus `protobuf:"bytes,2,opt,name=status,proto3,oneof"`
}
type ReplicationClient ¶
type ReplicationClient interface {
// Unary handshake: authenticate, exchange sync state.
Handshake(ctx context.Context, in *HandshakeRequest, opts ...grpc.CallOption) (*HandshakeResponse, error)
// Stream 1: realtime frames from boat head forward.
Live(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[LiveUpstream, LiveDownstream], error)
// Stream 2: bulk block transfer for backfilling holes.
Backfill(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[BackfillUpstream, BackfillDownstream], error)
}
ReplicationClient is the client API for Replication service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewReplicationClient ¶
func NewReplicationClient(cc grpc.ClientConnInterface) ReplicationClient
type ReplicationServer ¶
type ReplicationServer interface {
// Unary handshake: authenticate, exchange sync state.
Handshake(context.Context, *HandshakeRequest) (*HandshakeResponse, error)
// Stream 1: realtime frames from boat head forward.
Live(grpc.BidiStreamingServer[LiveUpstream, LiveDownstream]) error
// Stream 2: bulk block transfer for backfilling holes.
Backfill(grpc.BidiStreamingServer[BackfillUpstream, BackfillDownstream]) error
// contains filtered or unexported methods
}
ReplicationServer is the server API for Replication service. All implementations must embed UnimplementedReplicationServer for forward compatibility.
type Replication_BackfillClient ¶
type Replication_BackfillClient = grpc.BidiStreamingClient[BackfillUpstream, BackfillDownstream]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Replication_BackfillServer ¶
type Replication_BackfillServer = grpc.BidiStreamingServer[BackfillUpstream, BackfillDownstream]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Replication_LiveClient ¶
type Replication_LiveClient = grpc.BidiStreamingClient[LiveUpstream, LiveDownstream]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Replication_LiveServer ¶
type Replication_LiveServer = grpc.BidiStreamingServer[LiveUpstream, LiveDownstream]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type SeqRange ¶
type SeqRange struct {
Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` // inclusive
End uint64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` // exclusive
// contains filtered or unexported fields
}
func (*SeqRange) Descriptor
deprecated
func (*SeqRange) ProtoMessage ¶
func (*SeqRange) ProtoMessage()
func (*SeqRange) ProtoReflect ¶
func (x *SeqRange) ProtoReflect() protoreflect.Message
type UnimplementedReplicationServer ¶
type UnimplementedReplicationServer struct{}
UnimplementedReplicationServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedReplicationServer) Backfill ¶
func (UnimplementedReplicationServer) Backfill(grpc.BidiStreamingServer[BackfillUpstream, BackfillDownstream]) error
func (UnimplementedReplicationServer) Handshake ¶
func (UnimplementedReplicationServer) Handshake(context.Context, *HandshakeRequest) (*HandshakeResponse, error)
type UnsafeReplicationServer ¶
type UnsafeReplicationServer interface {
// contains filtered or unexported methods
}
UnsafeReplicationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ReplicationServer will result in compilation errors.