func ExampleResolver_Watch() {
	conf := &naming.Config{
		Nodes: []string{"127.0.0.1:7171"},
		Zone:  "sh1",
		Env:   "test",
	}
	dis := naming.New(conf)
	c := &consumer{
		conf:  conf,
		appID: "provider",
		dis:   dis.Build("provider"),
	}
	rsl := dis.Build(c.appID)
	ch := rsl.Watch()
	go c.getInstances(ch)
	in := c.getInstance()
	_ = in
}
This Example show how get watch a server provider and get provider instances.
package naming_test
import (
	"fmt"
	"time"
	"github.com/bilibili/discovery/naming"
)
func ExampleDiscovery_Register() {
	conf := &naming.Config{
		Nodes: []string{"127.0.0.1:7171"},  
		Zone:  "sh1",
		Env:   "test",
	}
	dis := naming.New(conf)
	ins := &naming.Instance{
		Zone:  "sh1",
		Env:   "test",
		AppID: "provider",
		Addrs:    []string{"http://172.0.0.1:8888", "grpc://172.0.0.1:9999"},
		LastTs:   time.Now().Unix(),
		Metadata: map[string]string{"weight": "10"},
	}
	cancel, _ := dis.Register(ins)
	defer cancel()  
	fmt.Println("register")
}
type consumer struct {
	conf  *naming.Config
	appID string
	dis   naming.Resolver
	ins   []*naming.Instance
}