kaffa 4c4ec24848 refactor: Improve stability and add IPv6 support
1. Fix order: Save to disk FIRST, then update HAProxy
   - Prevents inconsistency if HAProxy update succeeds but disk write fails
   - Data is preserved correctly on restart

2. Add IPv6 support
   - Use Python ipaddress module instead of regex
   - Now accepts both IPv4 and IPv6 addresses

3. Extract atomic_write_file() helper
   - Eliminates duplicated code in save_map_file, save_servers_config, haproxy_save_state
   - Single source of truth for atomic file operations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:38:00 +00:00
2026-02-01 11:37:06 +00:00
Description
HAProxy Dynamic Load Balancer Management with MCP Interface
MIT 302 KiB
Languages
Python 99.8%
Dockerfile 0.2%