pod

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	GetPodByIP(ip string) (Info, bool)
}

Cache for pod Info.

func NewCache

func NewCache(listener Listener) (Cache, processing.Handler)

NewCache creates a cache and its update handler

type Info

type Info struct {
	IP       string
	FullName resource.FullName
	Labels   map[string]string
	Locality string

	// ServiceAccountName the Spiffe name for the Pod service account.
	ServiceAccountName string

	NodeName string
}

Info for a Pod.

type Listener

type Listener struct {
	PodAdded   func(info Info)
	PodUpdated func(info Info)
	PodDeleted func(info Info)
}

Listener is an observer of updates to the pod cache.

Jump to

Keyboard shortcuts

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