kube

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EnablePprof bool
	PprofAddr   string
	KlogLevel   string
}

type Kube

type Kube struct {
	*Config

	RunnableComponents map[string]Runnable
}

func New

func New(c *Config) *Kube

func (*Kube) Initialize

func (c *Kube) Initialize() error

Initialize init all components of kube, block util initialization completed or error occurred.

func (*Kube) IntegrateWith

func (c *Kube) IntegrateWith(name string, r Runnable)

func (*Kube) Run

func (c *Kube) Run(stop <-chan struct{})

type Runnable

type Runnable interface {
	Run(stop <-chan struct{})
	Initialize() error
}

Runnable run components after initialized

Jump to

Keyboard shortcuts

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