def Kc.parse

bend-kube-runtime@0.2.0.0 · src/client.bend:582

import bend-kube-runtime@0.2.0.0/src/client.bend as Client
import Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J
import bend-kube-runtime@0.2.0.0/src/config.bend as K
import bend-kube-runtime@0.2.0.0/src/yaml.bend as Y

582# Reads one kubeconfig, JSON or YAML (yaml.bend), with its relative paths
583# made absolute against its own directory, as client-go does.
584def Kc.parse(+t: String, +path: String, json: Bool) -> Result<&2, &2, String, J.Json>:
585  match json:
586    case True{}:
587      Kc.rebased(J.Json.parse(t), path)
588    case False{}:
589      Done{K.Kube.rebase(Y.Yaml.parse(t), K.Kube.dir(path))}

Uses (9)

Used by (1)