Chore: persistence fakeip pool state

This commit is contained in:
yaling888
2022-04-13 05:55:08 +08:00
committed by MetaCubeX
parent 58cd8f9ac1
commit 3ea3653d7a
4 changed files with 64 additions and 18 deletions

View File

@ -15,6 +15,7 @@ type Enhancer interface {
FindHostByIP(net.IP) (string, bool)
FlushFakeIP() error
InsertHostByIP(net.IP, string)
StoreFakePoolSate()
}
func FakeIPEnabled() bool {
@ -77,3 +78,9 @@ func FlushFakeIP() error {
}
return nil
}
func StoreFakePoolSate() {
if mapper := DefaultHostMapper; mapper != nil {
mapper.StoreFakePoolSate()
}
}