diff --git a/service/api.go b/service/api.go index 9a5c9dfb..98892b79 100644 --- a/service/api.go +++ b/service/api.go @@ -1,7 +1,5 @@ package service -import "net" - /* EEBUSService */ //go:generate mockgen -destination=mock_service_test.go -package=service github.com/enbility/eebus-go/service EEBUSServiceHandler @@ -88,13 +86,3 @@ type MdnsService interface { RegisterMdnsSearch(cb MdnsSearch) UnregisterMdnsSearch(cb MdnsSearch) } - -//go:generate mockery --name=MdnsProvider - -type MdnsProvider interface { - CheckAvailability() bool - Shutdown() - Announce(serviceName string, port int, txt []string) error - Unannounce() - ResolveEntries(cancelChan chan bool, callback func(elements map[string]string, name, host string, addresses []net.IP, port int, remove bool)) -} diff --git a/service/mdns/api.go b/service/mdns/api.go new file mode 100644 index 00000000..f7c383fb --- /dev/null +++ b/service/mdns/api.go @@ -0,0 +1,13 @@ +package mdns + +import "net" + +//go:generate mockery --name=MdnsProvider + +type MdnsProvider interface { + CheckAvailability() bool + Shutdown() + Announce(serviceName string, port int, txt []string) error + Unannounce() + ResolveEntries(cancelChan chan bool, callback func(elements map[string]string, name, host string, addresses []net.IP, port int, remove bool)) +}