1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-18 08:26:38 +02:00
go-micro/registry/watcher.go

17 lines
348 B
Go
Raw Normal View History

2015-12-05 03:12:29 +02:00
package registry
2015-12-05 04:05:06 +02:00
// Watcher is an interface that returns updates
// about services within the registry.
2015-12-05 03:12:29 +02:00
type Watcher interface {
2015-12-05 04:05:06 +02:00
// Next is a blocking call
2015-12-05 03:12:29 +02:00
Next() (*Result, error)
Stop()
}
2015-12-05 04:05:06 +02:00
// Result is returned by a call to Next on
// the watcher. Actions can be create, update, delete
2015-12-05 03:12:29 +02:00
type Result struct {
Action string
Service *Service
}