rangeredis plugin of CoreDHCP.
This repo contains a CoreDHCP plugin, which could allocate IP addresses in a given range and save the address assigning status into Redis.
By utilizing the feature of Redis keyspace notifications, this plugin could be easily integrated into a large system.
The plugin could not run independently. It must be compiled with CoreDHCP and presented in CoreDHCP configuration.
-
Generate a customized CoreDHCP source code. The guide to compile CoreDHCP with third-party plugin could be found at here.
-
After a customized
coredhcp.go
is generated, you could clone this repo into the directory. -
Adjust the
import
part ofcoredhcp.go
file. Modify the entry of rangeredis plugin. -
Run go mod to get dependency for compiling.
go mod init coredhcpcomplie
go mod tidy
- Compile:
go build
- Add config.yaml & run the CoreDHCP. The example on how to config CoreDHCP with rangeredis is here.
The implementation of this plugin highly relies on the works of range plugin.