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

Function NewFileSecret

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

Source from the content-addressed store, hash-verified

798}
799
800func NewFileSecret(file string) *FileSecret {
801 return &FileSecret{file: file}
802}
803
804func (s *FileSecret) Fetch(context.Context) (string, error) {
805 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