#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include "common.h"
#include "loadbalancer.h"
Functions |
int | deltacloud_get_loadbalancers (struct deltacloud_api *api, struct deltacloud_loadbalancer **balancers) |
int | deltacloud_get_loadbalancer_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_loadbalancer *balancer) |
int | deltacloud_create_loadbalancer (struct deltacloud_api *api, const char *name, const char *realm_id, const char *protocol, int balancer_port, int instance_port, struct deltacloud_create_parameter *params, int params_length) |
int | deltacloud_loadbalancer_register (struct deltacloud_api *api, struct deltacloud_loadbalancer *balancer, const char *instance_id, struct deltacloud_create_parameter *params, int params_length) |
int | deltacloud_loadbalancer_unregister (struct deltacloud_api *api, struct deltacloud_loadbalancer *balancer, const char *instance_id, struct deltacloud_create_parameter *params, int params_length) |
int | deltacloud_loadbalancer_destroy (struct deltacloud_api *api, struct deltacloud_loadbalancer *balancer) |
void | deltacloud_free_loadbalancer (struct deltacloud_loadbalancer *lb) |
void | deltacloud_free_loadbalancer_list (struct deltacloud_loadbalancer **lbs) |
Detailed Description
Function Documentation
int deltacloud_create_loadbalancer |
( |
struct deltacloud_api * |
api, |
|
|
const char * |
name, |
|
|
const char * |
realm_id, |
|
|
const char * |
protocol, |
|
|
int |
balancer_port, |
|
|
int |
instance_port, |
|
|
struct deltacloud_create_parameter * |
params, |
|
|
int |
params_length |
|
) |
| |
A function to create a new load balancer.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | name | The name to give to the new load balancer |
[in] | realm_id | The realm ID to put the new load balancer in |
[in] | protocol | The protocol to load balance |
[in] | balancer_port | The port the load balancer listens on |
[in] | instance_port | The port the load balancer balances to |
[in] | params | An array of deltacloud_create_parameter structures that represent any optional parameters to pass into the create call |
[in] | params_length | An integer describing the length of the params array |
- Returns:
- 0 on success, -1 on error
A function to get a linked list of all of the load balancers. The caller is expected to free the list using deltacloud_free_loadbalancer_list().
- Parameters:
-
- Returns:
- 0 on success, -1 on error
A function to destroy a load balancer.
- Parameters:
-
- Returns:
- 0 on success, -1 on error
A function to register an instance to a load balancer.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | balancer | The deltacloud_loadbalancer structure representing the load balancer |
[in] | instance_id | The instance ID to add to the load balancer |
[in] | params | An array of deltacloud_create_parameter structures that represent any optional parameters to pass into the register call |
[in] | params_length | An integer describing the length of the params array |
- Returns:
- 0 on success, -1 on error
A function to unregister an instance from a load balancer.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | balancer | The deltacloud_loadbalancer structure representing the load balancer |
[in] | instance_id | The instance ID to remove from the load balancer |
[in] | params | An array of deltacloud_create_parameter structures that represent any optional parameters to pass into the unregister call |
[in] | params_length | An integer describing the length of the params array |
- Returns:
- 0 on success, -1 on error