Add ability to get dockerhost IP for etcd API usage

- Rename custom types as generics since its more fitting
- Add comments