github.com/netdata/go.d.plugin@v0.58.1/pkg/web/doc_test.go (about) 1 // SPDX-License-Identifier: GPL-3.0-or-later 2 3 package web 4 5 func ExampleHTTP_usage() { 6 // Just embed HTTP into your module structure. 7 // It allows you to have both Request and Client fields in the module configuration file. 8 type myModule struct { 9 HTTP `yaml:",inline"` 10 } 11 12 var m myModule 13 _, _ = NewHTTPRequest(m.Request) 14 _, _ = NewHTTPClient(m.Client) 15 }