Documentation ¶
Index ¶
Examples ¶
Constants ¶
View Source
const ( OverwriteExistingDstKey = 1 << iota ErrorOnExistingDstKey = 1 << iota ErrorOnDifferentDstKeyValue = 1 << iota )
mergeMaps flags
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApplyResult ¶
func Apply ¶
func Apply(namespace string, data []byte, storage clientapi.ClientMappings) (result []ApplyResult, err error)
Apply creates and manages resources defined in the Config. The create process wont stop on error, but it will finish the job and then return error and for each item in the config a error and status message string.
Example ¶
kubeClient, _ := kclient.New(&kclient.Config{Host: "127.0.0.1"}) testClientMappings := clientapi.ClientMappings{ "pods": {"Pod", kubeClient.RESTClient, klatest.Codec}, "services": {"Service", kubeClient.RESTClient, klatest.Codec}, } data, _ := ioutil.ReadFile("config_test.json") Apply(kapi.NamespaceDefault, data, testClientMappings)
Output:
Click to show internal directories.
Click to hide internal directories.