MCPcopy Create free account
hub / github.com/prometheus/common / NewFileSecret

Function NewFileSecret

config/http_config.go:801–803  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

799}
800
801func NewFileSecret(file string) *FileSecret {
802 return &FileSecret{file: file}
803}
804
805func (s *FileSecret) Fetch(context.Context) (string, error) {
806 fileBytes, err := os.ReadFile(s.file)

Callers 3

TestOAuth2WithFileFunction · 0.85
TestOAuth2WithJWTAuthFunction · 0.85
toSecretFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestOAuth2WithFileFunction · 0.68
TestOAuth2WithJWTAuthFunction · 0.68