- Create namespace or project for running iperf tests:
oc new-project iperf-test
- Create server Pod
rm -f pod-iperf-server.yaml
| #!/bin/bash | |
| # Usage: $0 <pod> [tcpdump-filter] | |
| [[ "$1" == "" ]] && echo "Usage: $0 <pod> [tcpdump-filter]" && exit 1 | |
| ep_id=`kubectl get cep -A -o jsonpath="{.items[?(@.metadata.name==\"$1\")].status.id}"` | |
| iface=`cilium endpoint get $ep_id -o jsonpath="{[*].status.networking.interface-name}"` | |
| shift |
| string removeDuplicates(string toCleanUp) { | |
| std:stack< char > str_stack; | |
| for(char x : toCleanUp) { | |
| if( !str_stack.empty() && x == str_stack.top() ) str_stack.pop(); | |
| else str_stack.push( x ); | |
| } | |
| string res; | |
| res.reserve(str_stack.size()); // reserve the space so that the concatenation speeds up. |
Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:
project-root/
├── cmd/
│ ├── your-app-name/
│ │ ├── main.go # Application entry point
│ │ └── ... # Other application-specific files