summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/pkg/web/doc_test.go
blob: 137eed207968152d19abb7d52d8e12974146629f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// SPDX-License-Identifier: GPL-3.0-or-later

package web

func ExampleHTTP_usage() {
	// Just embed HTTP into your module structure.
	// It allows you to have both Request and Client fields in the module configuration file.
	type myModule struct {
		HTTP `yaml:",inline"`
	}

	var m myModule
	_, _ = NewHTTPRequest(m.Request)
	_, _ = NewHTTPClient(m.Client)
}