cluster

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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
	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