GEARMAN_WORKER_ADD_SERVER(3)
π NAME π
gearman_worker_add_server β the Gearmand documentation situation, live and direct from <http://gearman.info/> π (that's the manual name too, bestie, in case you were wondering β we're in GEARMAN_WORKER_ADD_SERVER(3) territory β¨)
πΈ SYNOPSIS πΈ
okay so first you gotta pull in the goods:
#include <libgearman/gearman.h>
and then here's the whole squad of functions you're working with, fr fr:
gearman_return_t
gearman_worker_add_server(gearman_worker_st *worker, const char *host, in_port_t port)
gearman_return_t
gearman_worker_add_servers(gearman_worker_st *worker, const char *servers)
void gearman_worker_remove_servers(gearman_worker_st *worker)
and don't forget to link it up, no cap:
Link with -lgearman
π¦ DESCRIPTION π¦
okay so let's break it down, bestie, because these three are lowkey doing different things and you do NOT wanna mix them up π
gearman_worker_add_server() will add an additional gearmand server to the list of servers that the worker will take work from. another one, added to the roster, iconic behavior honestly π
gearman_worker_remove_servers() will remove all servers from the gearman_worker_st. all of them. every single one. it's giving clear-the-group-chat π
gearman_worker_add_servers() takes a list of gearmand servers that will be parsed to provide servers for the worker. the format for this is:
SERVER[:PORT][,SERVER[:PORT]]...
Examples of this are:
10.0.0.1,10.0.0.2,10.0.0.3
localhost234,jobserver2.domain.com:7003,10.0.0.3
yes bestie, localhost234 is literally in the docs exactly like that, we do not question the classics, we simply observe and move on π
β RETURN VALUE β
gearman_worker_add_server() and gearman_worker_remove_servers() return gearman_return_t. that's the vibe check result right there, so go read it, don't just ignore it π
π HOME π
wanna find out more? (of course you do, you're a scholar π) go check out: <http://gearman.info/>
See also:
gearmand- Gearman Client/Worker Library
gearman_worker_st
β¨ Author β¨
Data Differential <http://www.datadifferential.com/>
π«Ά Copyright π«Ά
2011-2014, Data Differential, <http://www.datadifferential.com/>
and that's the whole page, bestie π
this was 1.1.21+ds, dated Feb 04, 2026, coming at you straight from the good people at Data Differential β stay slay, go add some servers, and remember: gearman_worker_remove_servers() takes them ALL away, so maybe don't call it mid-job fr fr πβ¨
π¦ where this page comes from
- ubuntu resolute: libgearman-dev 1.1.21+ds-1ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libgearman-dev 1.1.21+ds-1ubuntu3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms