To inspect the strcut you can use the %+v interpolation:
fmt.Println(fmt.Sprintf("%+v", myStruct))To inspect the strcut you can use the %+v interpolation:
fmt.Println(fmt.Sprintf("%+v", myStruct))The kubelet in Openshift is run using hyperkube.
It is evaluated as a systemd service called origin-node.
$ journalctl -u origin-node| from sklearn import datasets | |
| from sklearn import metrics | |
| from sklearn.naive_bayes import GaussianNB | |
| def get_iris_dataset(): | |
| """ | |
| Get the iris data set using sklearn library | |
| :return: Dictionary-like object | |
| """ |
| #!/usr/bin/env bash | |
| CONSUL_ADDR="${CONSUL_ADDR:-http://127.0.0.1:8500}" | |
| function create_session(){ | |
| local session_id=$(curl -s -XPUT "${CONSUL_ADDR}/v1/session/create" \ | |
| -d "{\"Name\": \"backup\"}" | jq -r '.ID' ) | |
| echo ${session_id} | |
| } |
| #!/usr/bin/env bash | |
| function perform_backup(){ | |
| echo -n "Copying some stuff on S3.." | |
| echo "Done!" | |
| } | |
| perform_backup |
If set -e is set, non-zero exit code during script run will terminate the execution.
To prevent immidient termination and add some logic to cleanup stuff, you may need to use trap command:
#!/usr/bin/env bash
set -e
function cleanup {
echo "Removing $TMP_STUFF_DIR"We need a global docker network in order to communicate between docker-compose setups on different hosts