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 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, BrokerHandler: nil, Context: context.Background(), Version: "Not Set", PingEndpoint: ":8222/connz", MeshkitConfigProvider: mcp.ViperKey, }
Functions ¶
Types ¶
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 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.