endpointer

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 4 Imported by: 0

README

README

  • endpointer.go - 端点缓存与更新
  • balancer/ - 负载均衡
  • executor/ - 请求执行器

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultEndpointer

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

func (*DefaultEndpointer) Close

func (de *DefaultEndpointer) Close()

func (*DefaultEndpointer) Endpoints

func (de *DefaultEndpointer) Endpoints() ([]endpoint.Endpoint, error)

type Endpointer

type Endpointer interface {
	Endpoints() ([]endpoint.Endpoint, error)
}

Endpointer resolves a set of live Endpoints from a service-discovery source. It subscribes to an Instancer and keeps an EndpointCache up to date.

func NewEndpointer

func NewEndpointer(src interfaces.Instancer, f endpoint.Factory, logger *log.Logger, options ...endpoint.EndpointerOption) Endpointer

NewEndpointer creates an Endpointer that subscribes to src and builds Endpoints using f. It starts a background goroutine to process events; call Close() on the returned value to stop it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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