Documentation ¶
Index ¶
Constants ¶
const ( // DefaultURI is the default endpoint of MySQL on the local machine. // Primarily used when initializing a new Client without a specific URI. DefaultURI = "mysql://root@localhost:3306?" )
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 WithCustomTLS ¶
func WithCustomTLS(uri string, cert string, serverName string) ClientOptionFunc
WithCustomTLS configures the RootCAs for the underlying TLS connection
func WithURI ¶
func WithURI(uri string) ClientOptionFunc
WithURI defines the full connection string for the MySQL connection Make this handle the different DSNs for these two? - https://github.com/go-sql-driver/mysql#dsn-data-source-name - https://github.com/go-mysql-org/go-mysql#driver
type Reader ¶
type Reader struct { }
Reader implements the behaviour defined by client.Reader for interfacing with MySQL.
func (*Reader) Read ¶
func (r *Reader) Read(resumeMap map[string]client.MessageSet, 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 behaviour defined by client.Tailer for interfacing with the MySQL binlog. We'll have to pass through the dsn so that we can use it to configure the sync client
func (*Tailer) Read ¶
func (t *Tailer) Read(resumeMap map[string]client.MessageSet, filterFn client.NsFilterFunc) client.MessageChanFunc
Tail does the things