Skip to content

Commit

Permalink
Move mdns package interface into api file
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Jan 5, 2024
1 parent b1ad959 commit 3a85095
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
12 changes: 0 additions & 12 deletions service/api.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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))
}
13 changes: 13 additions & 0 deletions service/mdns/api.go
Original file line number Diff line number Diff line change
@@ -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))
}

0 comments on commit 3a85095

Please sign in to comment.