remote_node.h
author Tero Marttila <terom@fixme.fi>
Sat, 30 Aug 2008 19:13:15 +0300
changeset 49 10c7dce1a043
parent 26 6d615203d963
permissions -rw-r--r--
autogenerate the memcache_test help output, and pipeline memcache requests
#ifndef REMOTE_NODE_H
#define REMOTE_NODE_H

#include <sys/socket.h>

#include "config.h"

/*
 * Information about a single remote render node.
 */

struct remote_node {
    int valid;

    /*
     * Static information
     */
    
    // the remote endpoint
    struct config_endpoint endpoint;

    // how many render requests this node can process concurrently
    int parallel_renders;
    
    /*
     * Dynamic information
     */

    // an estimate of how many render requests this node is currently processing
    int current_load;
};

/*
 * Initialize the given remote_node struct to work with the render node at the given address (à la parse_address).
 *
 * Note that this is a blocking function, and should only be called at startup.
 *
 * returns nonzero on error, zero on success.
 */
int remote_node_init (struct remote_node *node_info, const char *addr_spec);

#endif /* REMOTE_NODE_H */