NCBI C Toolkit Cross Reference

C/connect/ncbi_lb.h


  1 #ifndef CONNECT___NCBI_LB__H
  2 #define CONNECT___NCBI_LB__H
  3 
  4 /*  $Id: ncbi_lb.h,v 1.2 2006/01/11 20:17:53 lavr Exp $
  5  * ===========================================================================
  6  *
  7  *                            PUBLIC DOMAIN NOTICE
  8  *               National Center for Biotechnology Information
  9  *
 10  *  This software/database is a "United States Government Work" under the
 11  *  terms of the United States Copyright Act.  It was written as part of
 12  *  the author's official duties as a United States Government employee and
 13  *  thus cannot be copyrighted.  This software/database is freely available
 14  *  to the public for use. The National Library of Medicine and the U.S.
 15  *  Government have not placed any restriction on its use or reproduction.
 16  *
 17  *  Although all reasonable efforts have been taken to ensure the accuracy
 18  *  and reliability of the software and data, the NLM and the U.S.
 19  *  Government do not and cannot warrant the performance or results that
 20  *  may be obtained by using this software or data. The NLM and the U.S.
 21  *  Government disclaim all warranties, express or implied, including
 22  *  warranties of performance, merchantability or fitness for any particular
 23  *  purpose.
 24  *
 25  *  Please cite the author in any work or product based on this material.
 26  *
 27  * ===========================================================================
 28  *
 29  * Author:  Anton Lavrentiev
 30  *
 31  * File Description:
 32  *    Generic load-balancing API
 33  */
 34 
 35 #include "ncbi_servicep.h"
 36 
 37 #if 0/*defined(_DEBUG) && !defined(NDEBUG)*/
 38 #  define NCBI_LB_DEBUG 1
 39 #endif /*_DEBUG && !NDEBUG*/
 40 
 41 
 42 #ifdef __cplusplus
 43 extern "C" {
 44 #endif
 45 
 46 
 47 typedef struct {
 48     const SSERV_Info* info;
 49     double            status;
 50 } SLB_Candidate;
 51 
 52 
 53 typedef SLB_Candidate* (*FGetCandidate)(void* data, size_t n);
 54 
 55 
 56 extern size_t LB_Select(SERV_ITER     iter,
 57                         void*         data,
 58                         FGetCandidate getter,
 59                         double        bonus);
 60 
 61 
 62 #ifdef __cplusplus
 63 }  /* extern "C" */
 64 #endif
 65 
 66 
 67 /*
 68  * --------------------------------------------------------------------------
 69  * $Log: ncbi_lb.h,v $
 70  * Revision 1.2  2006/01/11 20:17:53  lavr
 71  * Unconditionally disable definition of NCBI_LB_DEBUG macro generation
 72  *
 73  * Revision 1.1  2005/12/16 15:59:40  lavr
 74  * Initial revision
 75  *
 76  * ==========================================================================
 77  */
 78 
 79 #endif /* CONNECT___NCBI_LB__H */
 80 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.