Documentation
¶
Overview ¶
this package contains what previously was run in main.go arranged as a library
Index ¶
- Variables
- func Run(log logger.Handler, optsSetters ...OptionsSetter) error
- type Options
- type OptionsSetter
- func WithBrokerHandler(value broker.Handler) OptionsSetter
- func WithContext(value context.Context) OptionsSetter
- func WithKubeConfig(value []byte) OptionsSetter
- func WithMeshkitConfigProvider(value string) OptionsSetter
- func WithOnlyK8sNamespaces(value ...string) OptionsSetter
- func WithOnlyK8sResources(value []string) OptionsSetter
- func WithOutputExtendedFile(value bool) OptionsSetter
- func WithOutputFileName(value string) OptionsSetter
- func WithOutputMode(value string) OptionsSetter
- func WithPingEndpoint(value string) OptionsSetter
- func WithStopAfterDuration(value time.Duration) OptionsSetter
- func WithVersion(value string) OptionsSetter
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowedOutputModes = []string{ config.OutputModeBroker, config.OutputModeFile, }
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 ¶
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
Click to show internal directories.
Click to hide internal directories.