MCPcopy
hub / github.com/openfaas/faas / GetAnnotations

Method GetAnnotations

gateway/scaling/function_query.go:31–41  ·  view source on GitHub ↗
(name string, namespace string)

Source from the content-addressed store, hash-verified

29}
30
31func (c *CachedFunctionQuery) GetAnnotations(name string, namespace string) (annotations map[string]string, err error) {
32 res, err := c.Get(name, namespace)
33 if err != nil {
34 return c.emptyAnnotations, err
35 }
36
37 if res.Annotations == nil {
38 return c.emptyAnnotations, nil
39 }
40 return *res.Annotations, nil
41}
42
43func (c *CachedFunctionQuery) Get(fn string, ns string) (ServiceQueryResponse, error) {
44

Callers

nothing calls this directly

Calls 1

GetMethod · 0.95

Tested by

no test coverage detected