tool

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(name string, plugins Plugins)

Run runs the "weaver-kube" binary. You can provide Run a set of Plugins to customize the behavior of "weaver-kube". The provided name is the name of the custom binary.

Types

type Plugins

type Plugins struct {
	// HandleLogEntry handles log entries produced by a component logger.
	HandleLogEntry func(context.Context, *protos.LogEntry) error
	// HandleTraceSpans handles spans produced by inter-component communication.
	HandleTraceSpans func(context.Context, []trace.ReadOnlySpan) error
	// HandleMetrics is called periodically on a snapshot of all metric values.
	HandleMetrics func(context.Context, []*metrics.MetricSnapshot) error
}

Plugins configure a Service Weaver application deployed on Kubernetes.

Note that the handlers inside a Plugins struct are invoked on every replica of a Service Weaver application binary on locally produced logs, metrics, and traces. Handlers may be called concurrently from multiple goroutines.

Jump to

Keyboard shortcuts

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