kit: github.com/go-kit/kit/sd/eureka Index | Files

package eureka

import "github.com/go-kit/kit/sd/eureka"

Package eureka provides Instancer and Registrar implementations for Netflix OSS's Eureka

Index

Package Files

doc.go instancer.go registrar.go

type Instancer Uses

type Instancer struct {
    // contains filtered or unexported fields
}

Instancer yields instances stored in the Eureka registry for the given app. Changes in that app are watched and will update the subscribers.

func NewInstancer Uses

func NewInstancer(conn fargoConnection, app string, logger log.Logger) *Instancer

NewInstancer returns a Eureka Instancer. It will start watching the given app string for changes, and update the subscribers accordingly.

func (*Instancer) Deregister Uses

func (s *Instancer) Deregister(ch chan<- sd.Event)

Deregister implements Instancer.

func (*Instancer) Register Uses

func (s *Instancer) Register(ch chan<- sd.Event)

Register implements Instancer.

func (*Instancer) Stop Uses

func (s *Instancer) Stop()

Stop terminates the Instancer.

type Registrar Uses

type Registrar struct {
    sync.Mutex
    // contains filtered or unexported fields
}

Registrar maintains service instance liveness information in Eureka.

func NewRegistrar Uses

func NewRegistrar(conn fargoConnection, instance *fargo.Instance, logger log.Logger) *Registrar

NewRegistrar returns an Eureka Registrar acting on behalf of the provided Fargo connection and instance. See the integration test for usage examples.

func (*Registrar) Deregister Uses

func (r *Registrar) Deregister()

Deregister implements sd.Registrar.

func (*Registrar) Register Uses

func (r *Registrar) Register()

Register implements sd.Registrar.

Package eureka imports 8 packages (graph). Updated 2017-09-19. Refresh now. Tools for package owners.