MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / AddFlags

Function AddFlags

pkg/outputs/http/config.go:73–86  ·  view source on GitHub ↗

AddFlags registers persistent flags for the HTTP output.

(flags *pflag.FlagSet)

Source from the content-addressed store, hash-verified

71
72// AddFlags registers persistent flags for the HTTP output.
73func AddFlags(flags *pflag.FlagSet) {
74 flags.Bool(httpEnabled, false, "Determines whether the HTTP output is enabled")
75 flags.Duration(httpTimeout, time.Second*5, "Represents the timeout for the HTTP requests")
76 flags.StringSlice(httpEndpoints, []string{}, "A comma-separated list of endpoints to which the events are sent. Must contain the HTTP/S protocol schema")
77 flags.String(httpProxyURL, "", "Specifies the HTTP proxy URL. It overrides the HTTP proxy URL as indicated by the environment variables")
78 flags.String(httpProxyUsername, "", "The username for HTTP proxy authentication")
79 flags.String(httpProxyPassword, "", "The password for HTTP proxy authentication")
80 flags.String(httpMethod, "POST", "Determines the HTTP verb to use in requests")
81 flags.String(httpUsername, "", "Username for the basic HTTP authentication")
82 flags.String(httpPassword, "", "Password for the basic HTTP authentication")
83 flags.Bool(httpEnableGzip, false, "Indicates whether the gzip compression is enabled")
84 flags.String(httpSerializer, string(outputs.JSON), "Indicates the event serializer type")
85 outputs.AddTLSFlags(flags, outputs.HTTP)
86}

Callers 1

NewWithOptsFunction · 0.92

Calls 3

AddTLSFlagsFunction · 0.92
StringSliceMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected