- Removed existing mDNS test file and replaced it with a new implementation.
- Added a new `mdns_registry.go` file that contains the MDNS registry logic.
- Updated the default registry to use the new MDNS registry.
- Refactored tests to accommodate the new MDNS registry implementation.
- Implemented service registration, deregistration, and service discovery using mDNS.
- Added encoding and decoding functions for mDNS TXT records.
- Implemented a watcher for monitoring service changes in the MDNS registry.
fixing test failed issue
change back error type
change registry.ErrNotFound back to selector.ErrNotFound
change back error type
change registry.ErrNotFound back to selector.ErrNotFound
remove the single node tunnel test
Fix read yaml config from memory
package main
import (
"fmt"
"github.com/micro/go-micro/config"
"github.com/micro/go-micro/config/source/memory"
)
var configData = []byte(`
---
a: 1234
`)
func main() {
memorySource := memory.NewSource(
memory.WithYAML(configData),
)
// Create new config
conf := config.NewConfig()
// Load file source
conf.Load(memorySource)
fmt.Println(string(conf.Bytes()))
}