adapter

package
v0.0.0-...-15ec0e9 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoggingConfig

func GetLoggingConfig(kc kubernetes.Interface, loggingConfigMapName string) (*pkglogging.Config, error)

GetLoggingConfig returns configmap typed pkglogging.Config from ApiServer.

func Main

func Main(component string, ctor AdapterConstructor)

func MainWithContext

func MainWithContext(component string, ctor AdapterConstructor, ctx context.Context)

MainWithContext - watches profiling and logging configmap - defines zap logger - runs injected AdapterConstructor which is called Receive Server - runs Profiling Server - Sends Signal to injected AdapterConstructor and shutdown Profiling Server when received

Types

type Adapter

type Adapter interface {
	Start(stopCh <-chan struct{})
}

Adapter must have Start method.

type AdapterConstructor

type AdapterConstructor func(ctx context.Context) Adapter

AdapterConstructor returns Adapter.

type SystemConfig

type SystemConfig struct {
	PodName                    string `split_words:"true"`
	ProfilePort                int    `default:"8018" split_words:"true"`
	LoggingConfigMapName       string `default:"config-logging" split_words:"true"`
	ObservabilityConfigMapName string `default:"config-observability" split_words:"true"`
	KubernetesMinVersion       string `split_words:"true" require:"true"`
}

Jump to

Keyboard shortcuts

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