k8pool

package module
v0.0.0-...-4642087 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 11 Imported by: 0

README

k8pool

Get kubernetes pod ips based on label selector.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger    logger
	OnUpdate  UpdateFunc
	Namespace string
	Selector  string
	PodIP     string
	PodPort   string
}

type PeerInfo

type PeerInfo struct {
	// (Optional) The name of the data center this peer is in. Leave blank if not using multi data center support.
	DataCenter string

	// (Required) The ip address of the peer
	IPAddress string

	// (Optional) The http address:port of the peer
	HTTPAddress string

	// (Optional) The grpc address:port of the peer
	GRPCAddress string

	// (Optional) Is true if PeerInfo is for this instance of app
	IsOwner bool
}

type Pool

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

func New

func New(conf Config) (*Pool, error)

func (*Pool) Close

func (e *Pool) Close()

type UpdateFunc

type UpdateFunc func([]PeerInfo)

Jump to

Keyboard shortcuts

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