-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Thibault Mange <[email protected]>
- Loading branch information
1 parent
f18d2f4
commit e1cd6ca
Showing
4 changed files
with
64 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package microshift | ||
|
||
import ( | ||
promcfg "github.com/prometheus/prometheus/config" | ||
"gopkg.in/yaml.v2" | ||
) | ||
|
||
type ScrapeConfigs struct { | ||
ScrapeConfigs []ScrapeConfig `yaml:"scrape_configs"` | ||
} | ||
|
||
type ScrapeConfig struct { | ||
promcfg.ScrapeConfig `yaml:",inline"` | ||
StaticConfigs []StaticConfig `yaml:"static_configs,omitempty"` | ||
} | ||
|
||
type StaticConfig struct { | ||
Targets []string `yaml:"targets"` | ||
} | ||
|
||
func (sc ScrapeConfigs) MarshalYAML() ([]byte, error) { | ||
ret, err := yaml.Marshal(sc) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return ret, nil | ||
} |