sharedcfg

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// We'll attempt to recompute EVERY service's endpoints at least this
	// often. Higher numbers = lower CPU/network load; lower numbers =
	// shorter amount of time before a mistaken endpoint is corrected.
	FullyResyncPeriod = time.Minute
)

common vars

Functions

This section is empty.

Types

type Configs

type Configs interface {
	Context() context.Context
	Namespace() string

	RestConfig() *rest.Config

	KubeClient() kubernetes.Interface
	KubeInformers() k8sinformers.SharedInformerFactory

	RefuncClient() clientset.Interface
	RefuncInformers() rfinformers.SharedInformerFactory
}

Configs provides client resources to use

type Runner

type Runner interface {
	Run(stopC <-chan struct{})
}

Runner is block and long running object defines a configs consumer

type RunnerFunc

type RunnerFunc func(stopC <-chan struct{})

func (RunnerFunc) Run

func (rf RunnerFunc) Run(stopC <-chan struct{})

type SharedConfigs

type SharedConfigs interface {
	Runner
	Configs() Configs
	AddController(func(cfg Configs) Runner)
}

SharedConfigs are collection of k8s configs & clients shared by multiple consumers

func New

func New(ctx context.Context, ns string) SharedConfigs

New creates a new SharedConfigs

Jump to

Keyboard shortcuts

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