Documentation ¶
Index ¶
Constants ¶
const ( // DefaultURI is the default endpoint of Postgres on the local machine. // Primarily used when initializing a new Client without a specific URI. DefaultURI = "postgres://127.0.0.1:5432?sslmode=disable" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a client to the underlying File source.
func NewClient ¶
func NewClient(options ...ClientOptionFunc) (*Client, error)
NewClient creates a default file client
type ClientOptionFunc ¶
ClientOptionFunc is a function that configures a Client. It is used in NewClient.
func WithURI ¶
func WithURI(uri string) ClientOptionFunc
WithURI defines the full connection string for the Postgres connection
type Config ¶
type Config struct { URI string `json:"uri" doc:"the uri to connect to, in the form 'user=my-user password=my-password dbname=dbname sslmode=require'"` Namespace string `json:"namespace" doc:"mongo namespace to read/write"` Debug bool `json:"debug" doc:"display debug information"` Tail bool `json:"tail" doc:"if tail is true, then the postgres source will tail the oplog after copying the namespace"` ReplicationSlot string `json:"replication_slot" doc:"required if tail is true; sets the replication slot to use for logical decoding"` }
Config provides configuration options for a postgres adaptor the notable difference between this and dbConfig is the presence of the Tail option
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Postgres is an adaptor to read / write to postgres. it works as a source by copying files, and then optionally tailing the oplog
func (*Postgres) Description ¶
Description for postgres adaptor
func (*Postgres) SampleConfig ¶
SampleConfig for postgres adaptor
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader implements the behavior defined by client.Reader for interfacing with MongoDB.
func (*Reader) Read ¶
func (r *Reader) Read(filterFn client.NsFilterFunc) client.MessageChanFunc
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session serves as a wrapper for the underlying *sql.DB
type Tailer ¶
type Tailer struct {
// contains filtered or unexported fields
}
Tailer implements the behavior defined by client.Tailer for interfacing with the MongoDB oplog.
func (*Tailer) Read ¶
func (t *Tailer) Read(filterFn client.NsFilterFunc) client.MessageChanFunc
Tail does the things