kubegroup

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 14 Imported by: 3

Documentation

Overview

Package kubegroup provides autodiscovery for groupcache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMyURL

func FindMyURL(groupcachePort string) (string, error)

FindMyURL returns my URL for groupcache pool. groupcachePort example: ":5000". Sample resulting URL: "http://10.0.0.1:5000"

func UpdatePeers

func UpdatePeers(options Options)

UpdatePeers continuously updates groupcache peers. groupcachePort example: ":5000".

Types

type Options added in v0.2.0

type Options struct {
	Pool           *groupcache.HTTPPool
	GroupCachePort string

	// PodLabelKey is label key to match peer PODs, if unspecified defaults to "app".
	// Example: If PODs are labeled as app=my-app-name, you could either set PodLabelKey
	// to "app" or leave it empty (since "app" is the default value).
	PodLabelKey string

	// PodLabelValue is label value to match peer PODs, if unspecified defaults to
	// current POD label value for PodLabelKey.
	// Example: If PODs are labeled as app=my-app-name, you could either set PodLabelValue
	// to "my-app-name" or leave it empty (since by default PodLabelValue takes its value
	// from the PodLabelKey key).
	PodLabelValue string
}

Options specifies options for UpdatePeers.

Jump to

Keyboard shortcuts

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