My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
haproxy.c File Reference
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include "msu_ids.h"
#include "runtime_communication.h"
#include "logging.h"

Go to the source code of this file.

Macros

#define SOCAT   "/usr/bin/socat"
 
#define SOCAT_INPUT   "set weight https/s%d %d\r\n"
 
#define WRITE_END   1
 
#define READ_END   0
 
#define N_QLEN_SAMPLES   10
 

Functions

int reweight_haproxy (int server, int weight)
 
void set_haproxy_weights (int rt_id, int offset)
 

Variables

char * socat_cmd [] = { "/usr/bin/socat" , "stdio", "/tmp/haproxy.socket", NULL}
 

Macro Definition Documentation

#define N_QLEN_SAMPLES   10

Definition at line 77 of file haproxy.c.

#define READ_END   0

Definition at line 38 of file haproxy.c.

#define SOCAT   "/usr/bin/socat"

Definition at line 31 of file haproxy.c.

#define SOCAT_INPUT   "set weight https/s%d %d\r\n"

Definition at line 35 of file haproxy.c.

#define WRITE_END   1

Definition at line 37 of file haproxy.c.

Function Documentation

int reweight_haproxy ( int  server,
int  weight 
)

Definition at line 40 of file haproxy.c.

void set_haproxy_weights ( int  rt_id,
int  offset 
)

Definition at line 102 of file haproxy.c.

Variable Documentation

char* socat_cmd[] = { "/usr/bin/socat" , "stdio", "/tmp/haproxy.socket", NULL}

Definition at line 33 of file haproxy.c.