Documentation ¶
Index ¶
- Constants
- func DefaultInstance() string
- func DefaultTxt(txtFlag map[string]string)
- func ParseKv(arg string) map[string]string
- func Register(instanceFlag, domainFlag, serviceFlag, interfaceFlag string, portFlag int, ...) error
- func Tenant(delta int)
- func Unregister()
- func UpdateSysInfo(txtFlag map[string]string)
- func Verbose(f func(string, ...interface{}))
- type LookupResult
- type Query
Constants ¶
View Source
const ( // Default is the default query. Default = "dnssd://?sort=tenants&sort=cpu.pcnt" // Timeout is the default query timeout. Timeout = 1 * time.Second // query-timeout )
Variables ¶
This section is empty.
Functions ¶
func DefaultInstance ¶
func DefaultInstance() string
func DefaultTxt ¶
func Unregister ¶
func Unregister()
func UpdateSysInfo ¶
Types ¶
type LookupResult ¶
type LookupResult struct { Entry dnssd.BrowseEntry Error error }
LookupResult holds a dnssd.BrowseEntry struct and an error. TOOD: it should implement the error interface
func Lookup ¶
func Lookup(query Query, n int) ([]*LookupResult, error)
lookup based on query, return resolved host, port, network, and error uri currently supported dnssd://instance._service._network.domain/?reqkey=reqvalue default for domain is local, default type _ncpu._tcp, and instance is wildcard can omit to underspecify, e.g. dnssd:?arch=arm64 to pick any arm64 cpu server
Click to show internal directories.
Click to hide internal directories.