Documentation
¶
Overview ¶
Package pqs is a generated protocol buffer package.
It is generated from these files:
pqstream.proto
It has these top-level messages:
ListenRequest RawEvent Event
Index ¶
- Variables
- func RegisterPQStreamServer(s *grpc.Server, srv PQStreamServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetChanges() *google_protobuf.Struct
- func (m *Event) GetId() string
- func (m *Event) GetOp() Operation
- func (m *Event) GetPayload() *google_protobuf.Struct
- func (m *Event) GetSchema() string
- func (m *Event) GetTable() string
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) String() string
- type ListenRequest
- type Operation
- type PQStreamClient
- type PQStreamServer
- type PQStream_ListenClient
- type PQStream_ListenServer
- type RawEvent
- func (*RawEvent) Descriptor() ([]byte, []int)
- func (m *RawEvent) GetId() string
- func (m *RawEvent) GetOp() Operation
- func (m *RawEvent) GetPayload() *google_protobuf.Struct
- func (m *RawEvent) GetPrevious() *google_protobuf.Struct
- func (m *RawEvent) GetSchema() string
- func (m *RawEvent) GetTable() string
- func (*RawEvent) ProtoMessage()
- func (m *RawEvent) Reset()
- func (m *RawEvent) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Operation_name = map[int32]string{
0: "UNKNOWN",
1: "INSERT",
2: "UPDATE",
3: "DELETE",
4: "TRUNCATE",
}
View Source
var Operation_value = map[string]int32{
"UNKNOWN": 0,
"INSERT": 1,
"UPDATE": 2,
"DELETE": 3,
"TRUNCATE": 4,
}
Functions ¶
func RegisterPQStreamServer ¶
func RegisterPQStreamServer(s *grpc.Server, srv PQStreamServer)
Types ¶
type Event ¶
type Event struct { Schema string `protobuf:"bytes,1,opt,name=schema" json:"schema,omitempty"` Table string `protobuf:"bytes,2,opt,name=table" json:"table,omitempty"` Op Operation `protobuf:"varint,3,opt,name=op,enum=pqs.Operation" json:"op,omitempty"` // if the id column exists, this will populate it Id string `protobuf:"bytes,4,opt,name=id" json:"id,omitempty"` // payload is a json encoded representation of the changed object. Payload *google_protobuf.Struct `protobuf:"bytes,5,opt,name=payload" json:"payload,omitempty"` // changes is, in the event of op==UPDATE an RFC7386 JSON merge patch. Changes *google_protobuf.Struct `protobuf:"bytes,6,opt,name=changes" json:"changes,omitempty"` }
A database event.
func (*Event) Descriptor ¶
func (*Event) GetChanges ¶
func (m *Event) GetChanges() *google_protobuf.Struct
func (*Event) GetPayload ¶
func (m *Event) GetPayload() *google_protobuf.Struct
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
type ListenRequest ¶
type ListenRequest struct { // if provided, this string will be used to match table names to track. TableRegexp string `protobuf:"bytes,1,opt,name=table_regexp,json=tableRegexp" json:"table_regexp,omitempty"` }
A request to listen to database event streams.
func (*ListenRequest) Descriptor ¶
func (*ListenRequest) Descriptor() ([]byte, []int)
func (*ListenRequest) GetTableRegexp ¶
func (m *ListenRequest) GetTableRegexp() string
func (*ListenRequest) ProtoMessage ¶
func (*ListenRequest) ProtoMessage()
func (*ListenRequest) Reset ¶
func (m *ListenRequest) Reset()
func (*ListenRequest) String ¶
func (m *ListenRequest) String() string
type Operation ¶
type Operation int32
An operation in the database.
func (Operation) EnumDescriptor ¶
type PQStreamClient ¶
type PQStreamClient interface { // Listen responds with a stream of database operations. Listen(ctx context.Context, in *ListenRequest, opts ...grpc.CallOption) (PQStream_ListenClient, error) }
func NewPQStreamClient ¶
func NewPQStreamClient(cc *grpc.ClientConn) PQStreamClient
type PQStreamServer ¶
type PQStreamServer interface { // Listen responds with a stream of database operations. Listen(*ListenRequest, PQStream_ListenServer) error }
type PQStream_ListenClient ¶
type PQStream_ListenClient interface { Recv() (*Event, error) grpc.ClientStream }
type PQStream_ListenServer ¶
type PQStream_ListenServer interface { Send(*Event) error grpc.ServerStream }
type RawEvent ¶
type RawEvent struct { Schema string `protobuf:"bytes,1,opt,name=schema" json:"schema,omitempty"` Table string `protobuf:"bytes,2,opt,name=table" json:"table,omitempty"` Op Operation `protobuf:"varint,3,opt,name=op,enum=pqs.Operation" json:"op,omitempty"` Id string `protobuf:"bytes,4,opt,name=id" json:"id,omitempty"` Payload *google_protobuf.Struct `protobuf:"bytes,5,opt,name=payload" json:"payload,omitempty"` Previous *google_protobuf.Struct `protobuf:"bytes,6,opt,name=previous" json:"previous,omitempty"` }
RawEvent is an internal type.
func (*RawEvent) Descriptor ¶
func (*RawEvent) GetPayload ¶
func (m *RawEvent) GetPayload() *google_protobuf.Struct
func (*RawEvent) GetPrevious ¶
func (m *RawEvent) GetPrevious() *google_protobuf.Struct
func (*RawEvent) ProtoMessage ¶
func (*RawEvent) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.