Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello from Service A")
})
fmt.Println("Service A listening on :8080")
http.ListenAndServe(":8080", nil)
}
// In a Kubernetes cluster, Istio or Linkerd sidecars automatically
// intercept traffic between services and enforce mTLS.
// Example request from Service B:
// resp, _ := http.Get("http://service-a/hello")Coding works best on desktop or with an external keyboard.