refactor: move http api to a new transport layer
This commit is contained in:
parent
476c4b056f
commit
0448f66ab2
41 changed files with 822 additions and 390 deletions
14
internal/transport/dns/handlers.go
Normal file
14
internal/transport/dns/handlers.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package dns
|
||||
|
||||
import (
|
||||
"git.wzray.com/homelab/hivemind/internal/transport"
|
||||
"git.wzray.com/homelab/hivemind/internal/types"
|
||||
)
|
||||
|
||||
type DnsHandlers interface {
|
||||
Callback(types.HostState) (bool, error)
|
||||
}
|
||||
|
||||
func Register(registrator transport.Registrator, h DnsHandlers) {
|
||||
callbackRoute.Register(registrator, h.Callback)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue