cluster

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(api string, fn Match)

Types

type Cluster

type Cluster struct {
	Discovery
	Instances []Instance
}

type Clusters

type Clusters []Cluster

type Criteria

type Criteria struct {
	Region           string
	Zone             string
	AvailabilityZone string
	Tags             []string
	Labels           map[string]string
	Project          string
	URL              string
	Service          string
}

type Discoveries

type Discoveries []Discovery

type Discovery

type Discovery struct {
	Api     string
	Cluster string
	Criteria
	HealthChecks []HealthCheck
}

type HealthCheck

type HealthCheck struct {
	URL            string
	TimeoutMs      int
	ExpectedStatus int
	MaxRetries     int
	MinAge         time.Duration
	MinAgeSec      int
}

type Instance

type Instance struct {
	Name      string
	PrivateIP string
	StartTime time.Time
}

type Match

type Match func(criteria *Criteria) ([]Instance, error)

type Service

type Service struct {
}

func New

func New() *Service

func (*Service) Discover

func (s *Service) Discover(discovery *Discovery) (*Cluster, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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