Codebase list golang-github-go-kit-kit / run/0c243515-0bf2-4b25-8735-9c1038fa7c1b/main sd / registrar.go
run/0c243515-0bf2-4b25-8735-9c1038fa7c1b/main

Tree @run/0c243515-0bf2-4b25-8735-9c1038fa7c1b/main (Download .tar.gz)

registrar.go @run/0c243515-0bf2-4b25-8735-9c1038fa7c1b/mainraw · history · blame

package sd

// Registrar registers instance information to a service discovery system when
// an instance becomes alive and healthy, and deregisters that information when
// the service becomes unhealthy or goes away.
//
// Registrar implementations exist for various service discovery systems. Note
// that identifying instance information (e.g. host:port) must be given via the
// concrete constructor; this interface merely signals lifecycle changes.
type Registrar interface {
	Register()
	Deregister()
}