meshsync

package
v0.8.26 Latest Latest
Warning

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

Go to latest
Published: Oct 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,
	OutputExtendedFile: false,
	BrokerHandler:      nil,
	Context:            context.Background(),

	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
	OutputExtendedFile bool
	BrokerHandler      broker.Handler
	Context            context.Context
	OnlyK8sNamespaces  []string
	OnlyK8sResources   []string

	Version               string
	PingEndpoint          string
	MeshkitConfigProvider string
}

type OptionsSetter

type OptionsSetter func(*Options)

func WithBrokerHandler

func WithBrokerHandler(value broker.Handler) OptionsSetter

func WithContext added in v0.8.19

func WithContext(value context.Context) 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 WithOnlyK8sNamespaces added in v0.8.22

func WithOnlyK8sNamespaces(value ...string) OptionsSetter

func WithOnlyK8sResources added in v0.8.22

func WithOnlyK8sResources(value []string) OptionsSetter

func WithOutputExtendedFile added in v0.8.21

func WithOutputExtendedFile(value bool) 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