def Serve.samples
import bend-kube-runtime@0.2.0.0/src/serve.bend as Serveimport Base
import bend-kube-runtime@0.2.0.0/src/runtime.bend as R
140# One sample per controller, labeled with its kind.
141def Serve.samples(ss: List<&2, R.Snap>, +name: String, +field: U32) -> String:
142 match ss:
143 case Nil{}:
144 ""
145 case Con{+x, t}:
146 name ++ "{controller=\"" ++ Serve.snap.name(x) ++ "\"} " ++ Serve.snap.field(x, field) ++ "\n"
147 ++ Serve.samples(t, name, field)