Reformat blr.h
By oversight was not reformatted when the source was.
This commit is contained in:
@ -211,7 +211,8 @@ enum blr_event_state
|
||||
};
|
||||
|
||||
/* Master Server configuration struct */
|
||||
typedef struct master_server_config {
|
||||
typedef struct master_server_config
|
||||
{
|
||||
char *host;
|
||||
unsigned short port;
|
||||
char logfile[BINLOG_FNAMELEN+1];
|
||||
@ -223,7 +224,8 @@ typedef struct master_server_config {
|
||||
} MASTER_SERVER_CFG;
|
||||
|
||||
/* Config struct for CHANGE MASTER TO options */
|
||||
typedef struct change_master_options {
|
||||
typedef struct change_master_options
|
||||
{
|
||||
char *host;
|
||||
char *port;
|
||||
char *binlog_file;
|
||||
@ -235,7 +237,8 @@ typedef struct change_master_options {
|
||||
/**
|
||||
* Packet header for replication messages
|
||||
*/
|
||||
typedef struct rep_header {
|
||||
typedef struct rep_header
|
||||
{
|
||||
int payload_len; /*< Payload length (24 bits) */
|
||||
uint8_t seqno; /*< Response sequence number */
|
||||
uint8_t ok; /*< OK Byte from packet */
|
||||
@ -251,7 +254,8 @@ typedef struct rep_header {
|
||||
* The binlog record structure. This contains the actual packet read from the binlog
|
||||
* file.
|
||||
*/
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
unsigned long position; /*< binlog record position for this cache entry */
|
||||
GWBUF *pkt; /*< The packet received from the master */
|
||||
REP_HEADER hdr; /*< The packet header */
|
||||
@ -261,14 +265,16 @@ typedef struct {
|
||||
* The binlog cache. A cache exists for each file that hold cached bin log records.
|
||||
* Caches will be used for all files being read by more than 1 slave.
|
||||
*/
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
BLCACHE_RECORD **records; /*< The actual binlog records */
|
||||
int current; /*< The next record that will be inserted */
|
||||
int cnt; /*< The number of records in the cache */
|
||||
SPINLOCK lock; /*< The spinlock for the cache */
|
||||
} BLCACHE;
|
||||
|
||||
typedef struct blfile {
|
||||
typedef struct blfile
|
||||
{
|
||||
char binlogname[BINLOG_FNAMELEN+1]; /*< Name of the binlog file */
|
||||
int fd; /*< Actual file descriptor */
|
||||
int refcnt; /*< Reference count for file */
|
||||
@ -280,7 +286,8 @@ typedef struct blfile {
|
||||
/**
|
||||
* Slave statistics
|
||||
*/
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
int n_events; /*< Number of events sent */
|
||||
unsigned long n_bytes; /*< Number of bytes sent */
|
||||
int n_bursts; /*< Number of bursts sent */
|
||||
@ -305,7 +312,8 @@ typedef struct {
|
||||
* The client session structure used within this router. This represents
|
||||
* the slaves that are replicating binlogs from MaxScale.
|
||||
*/
|
||||
typedef struct router_slave {
|
||||
typedef struct router_slave
|
||||
{
|
||||
#if defined(SS_DEBUG)
|
||||
skygw_chk_t rses_chk_top;
|
||||
#endif
|
||||
@ -351,7 +359,8 @@ typedef struct router_slave {
|
||||
/**
|
||||
* The statistics for this router instance
|
||||
*/
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
int n_slaves; /*< Number slave sessions created */
|
||||
int n_reads; /*< Number of record reads */
|
||||
uint64_t n_binlogs; /*< Number of binlog records from master */
|
||||
@ -378,7 +387,8 @@ typedef struct {
|
||||
/**
|
||||
* Saved responses from the master that will be forwarded to slaves
|
||||
*/
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
GWBUF *server_id; /*< Master server id */
|
||||
GWBUF *heartbeat; /*< Heartbeat period */
|
||||
GWBUF *chksum1; /*< Binlog checksum 1st response */
|
||||
@ -401,7 +411,8 @@ typedef struct {
|
||||
/**
|
||||
* The per instance data for the router.
|
||||
*/
|
||||
typedef struct router_instance {
|
||||
typedef struct router_instance
|
||||
{
|
||||
SERVICE *service; /*< Pointer to the service using this router */
|
||||
ROUTER_SLAVE *slaves; /*< Link list of all the slave connections */
|
||||
SPINLOCK lock; /*< Spinlock for the instance data */
|
||||
@ -503,12 +514,16 @@ typedef struct router_instance {
|
||||
|
||||
#define BLRM_MAXSTATE 0x0016
|
||||
|
||||
static char *blrm_states[] = { "Unconfigured", "Unconnected", "Connecting", "Authenticated", "Timestamp retrieval",
|
||||
static char *blrm_states[] =
|
||||
{
|
||||
"Unconfigured", "Unconnected", "Connecting", "Authenticated", "Timestamp retrieval",
|
||||
"Server ID retrieval", "HeartBeat Period setup", "binlog checksum config",
|
||||
"binlog checksum rerieval", "GTID Mode retrieval", "Master UUID retrieval",
|
||||
"Set Slave UUID", "Set Names latin1", "Set Names utf8", "select 1",
|
||||
"select version()", "select @@version_comment", "select @@hostname",
|
||||
"select @@max_allowed_packet", "Register slave", "Binlog Dump", "Slave stopped", "Set MariaDB slave capability" };
|
||||
"select @@max_allowed_packet", "Register slave", "Binlog Dump", "Slave stopped",
|
||||
"Set MariaDB slave capability"
|
||||
};
|
||||
|
||||
#define BLRS_CREATED 0x0000
|
||||
#define BLRS_UNREGISTERED 0x0001
|
||||
@ -518,8 +533,10 @@ static char *blrm_states[] = { "Unconfigured", "Unconnected", "Connecting", "Aut
|
||||
|
||||
#define BLRS_MAXSTATE 0x0004
|
||||
|
||||
static char *blrs_states[] = { "Created", "Unregistered", "Registered",
|
||||
"Sending binlogs", "Errored" };
|
||||
static char *blrs_states[] =
|
||||
{
|
||||
"Created", "Unregistered", "Registered", "Sending binlogs", "Errored"
|
||||
};
|
||||
|
||||
/**
|
||||
* Slave catch-up status
|
||||
|
Reference in New Issue
Block a user