endpoint

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package endpoint provides the type Endpoint, to be used with the targets.Targets interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamesFromEndpoints added in v0.10.8

func NamesFromEndpoints(endpoints []Endpoint) []string

NamesFromEndpoints is convenience function to build a list of names from endpoints.

Types

type Endpoint

type Endpoint struct {
	Name        string
	Labels      map[string]string
	LastUpdated time.Time
	Port        int
}

Endpoint represents a targets and associated parameters.

func EndpointsFromNames

func EndpointsFromNames(names []string) []Endpoint

EndpointsFromNames is convenience function to build a list of endpoints from only names. It leaves the Port field in Endpoint unset and initializes Labels field to an empty map.

func (*Endpoint) Key added in v0.11.2

func (ep *Endpoint) Key() string

Key returns a string key that uniquely identifies that endpoint. Endpoint key consists of endpoint name, port and labels.

type Lister added in v0.11.1

type Lister interface {
	// ListEndpoints returns list of endpoints (name, port tupples).
	ListEndpoints() []Endpoint
}

Lister should implement the ListEndpoints method.

Jump to

Keyboard shortcuts

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