meshsync

package
v0.8.17 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

this package contains what previously was run in main.go arranged as a library

Index

Constants

This section is empty.

Variables

View Source
var DefautOptions = Options{
	StopAfterDuration: -1,
	KubeConfig:        nil,
	BrokerHandler:     nil,

	Version:               "Not Set",
	PingEndpoint:          ":8222/connz",
	MeshkitConfigProvider: mcp.ViperKey,
}

Functions

func Run

func Run(log logger.Handler, optsSetters ...OptionsSetter) error

TODO fix cyclop error Error: main.go:46:1: calculated cyclomatic complexity for function mainWithExitCode is 25, max is 10 (cyclop)

Types

type Options

type Options struct {
	OutputMode        string
	StopAfterDuration time.Duration
	KubeConfig        []byte
	OutputFileName    string
	BrokerHandler     broker.Handler

	Version               string
	PingEndpoint          string
	MeshkitConfigProvider string
}

type OptionsSetter

type OptionsSetter func(*Options)

func WithBrokerHandler

func WithBrokerHandler(value broker.Handler) OptionsSetter

func WithKubeConfig

func WithKubeConfig(value []byte) OptionsSetter

value here is all what is good to pass to github.com/meshery/meshkit/utils/kubernetes/client.go:DetectKubeConfig

func WithMeshkitConfigProvider

func WithMeshkitConfigProvider(value string) OptionsSetter

func WithOutputFileName

func WithOutputFileName(value string) OptionsSetter

func WithOutputMode

func WithOutputMode(value string) OptionsSetter

value is one of the AllowedOutputModes

func WithPingEndpoint

func WithPingEndpoint(value string) OptionsSetter

func WithStopAfterDuration

func WithStopAfterDuration(value time.Duration) OptionsSetter

func WithVersion

func WithVersion(value string) OptionsSetter

Jump to

Keyboard shortcuts

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