eureka

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package eureka implements onexmesh registry.Registrar and registry.Discovery against a Netflix Eureka server over its REST API, using net/http only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiscovery

func NewDiscovery(opts Options) (registry.Discovery, error)

NewDiscovery creates an Eureka Discovery.

func NewRegistrar

func NewRegistrar(opts Options) (registry.Registrar, error)

NewRegistrar creates an Eureka Registrar.

Types

type Options

type Options struct {
	// ServerURL is the Eureka server base URL, e.g. "http://127.0.0.1:8761/eureka".
	ServerURL string
	// HostName is the hostname to register, defaulting to the local host.
	HostName string
	// Host is the instance IP/host advertised to clients.
	Host string
	// Port is the instance port advertised to clients.
	Port int
	// Protocol is the service protocol, e.g. "grpc" or "http".
	Protocol string
	// TTL is the lease renewal interval; the registrar heartbeats at half this
	// interval. Default 30s.
	TTL time.Duration
}

Options configures the Eureka backend.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL