Skip to content

disasters/plumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plumber

Pluggable service discovery + load balancing for legacy systems.

Plumber is an LD_PRELOAD hooking library for Discotech, providing lazy initialization and hooks of connect, sendto and getaddrinfo.

getaddrinfo: does hostname match a pattern? return magic IP

connect/sendto: is ip magic? perform callback fetcher

Usage

Linux/FreeBSD:

DISCO_CONF=/path/to/discotech.conf.json \
LD_PRELOAD=target/debug/libplumber.so \
$PROGRAM

OSX:

DISCO_CONF=/path/to/discotech.conf.json \
DYLD_INSERT_LIBRARIES=/abs/path/to/libplumber.so \
DYLD_FORCE_FLAT_NAMESPACE=YES \
$PROGRAM