kit: Index | Files

package eureka

import ""

Package eureka provides subscriber and registrar implementations for Netflix OSS's Eureka


Package Files

doc.go registrar.go subscriber.go

type Registrar Uses

type Registrar struct {
    // 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.

type Subscriber Uses

type Subscriber struct {
    // contains filtered or unexported fields

Subscriber yields endpoints stored in the Eureka registry for the given app. Changes in that app are watched and will update the Subscriber endpoints.

func NewSubscriber Uses

func NewSubscriber(conn fargoConnection, app string, factory sd.Factory, logger log.Logger) *Subscriber

NewSubscriber returns a Eureka subscriber. It will start watching the given app string for changes, and update the endpoints accordingly.

func (*Subscriber) Endpoints Uses

func (s *Subscriber) Endpoints() ([]endpoint.Endpoint, error)

Endpoints implements the Subscriber interface.

func (*Subscriber) Stop Uses

func (s *Subscriber) Stop()

Stop terminates the subscriber.

Package eureka imports 9 packages (graph). Updated 2017-04-10. Refresh now. Tools for package owners.