def Event.post
bend-kube-runtime@0.2.0.0 · src/helpers.bend:120
import bend-kube-runtime@0.2.0.0/src/helpers.bend as Helpers
import Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J
import bend-kube-runtime@0.2.0.0/src/core.bend as C
import bend-kube-runtime@0.2.0.0/src/config.bend as K
import bend-kube-runtime@0.2.0.0/src/client.bend as Cl
120def Event.post(+cfg: K.Config, +o: J.Json, +r: C.Res, warn: Bool, reason: String, action: String,
121 note: String, controller: String, st: Stamp) -> IO(Unit):
122 match st:
123 case Stamp{now, id}:
124 IO.bind(Result<&2, &2, Cl.KErr, J.Json>, Unit,
125 Cl.Client.create(cfg, C.Api{C.Res.events(), C.InNs{Event.ns(C.Obj.namespace(o))}},
126 Event.body(o, r, warn, reason, action, note, controller, now, id)),
127 Event.sent)