MCPcopy Create free account
hub / github.com/cloudbase/garm / GetAllCredentials

Method GetAllCredentials

cache/credentials_cache.go:96–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94}
95
96func (g *CredentialCache) GetAllCredentials() []params.ForgeCredentials {
97 g.mux.Lock()
98 defer g.mux.Unlock()
99
100 creds := make([]params.ForgeCredentials, 0, len(g.cache))
101 for _, cred := range g.cache {
102 creds = append(creds, cred)
103 }
104
105 // Sort the credentials by ID
106 sortByID(creds)
107 return creds
108}
109
110func (g *CredentialCache) GetAllCredentialsAsMap() map[uint]params.ForgeCredentials {
111 g.mux.Lock()

Callers 2

GetAllGithubCredentialsFunction · 0.80
GetAllGiteaCredentialsFunction · 0.80

Calls 3

sortByIDFunction · 0.85
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected