Skip to main content

Go

Go is fully supported by Speedscale. Use this page for Go-specific proxy settings, TLS trust configuration, demo guidance, and the Proxymock local workflow.

Kubernetes Sidecar

When Go runs with the Speedscale sidecar in forward or dual mode, the Go runtime must still send outbound traffic to the sidecar. Set HTTP_PROXY and HTTPS_PROXY to http://127.0.0.1:4140 unless you changed proxy-out-port.

If tls-out is enabled, trust and routing are separate concerns:

  • routing: HTTP_PROXY and HTTPS_PROXY
  • TLS trust: SSL_CERT_FILE or the language-specific trust mechanism in your image

See Proxy Modes and TLS Support for the shared sidecar behavior.

Demo App

  • Public demo: speedscale/outerspace-go
  • Stack: Go service with HTTP and gRPC endpoints
  • Local run: go run main.go
  • Quick validation: ./tests/run_http_tests.sh --recording

This is the canonical public Go demo for the Proxymock quickstart and local replay workflow.

Proxymock

Use this path for the fastest Go first success on a developer workstation.

  1. 1. Install and initialize Proxymock
    brew install speedscale/tap/proxymock
    proxymock init

    Use browser sign-in by default. Use `proxymock init --api-key <your key>` only for CI or other headless environments.

  2. 2. Start recording
    git clone https://github.com/speedscale/outerspace-go
    cd outerspace-go
    proxymock record -- go run main.go

    Proxymock records the app while it starts the Go service as a child process.

  3. 3. Generate one real workflow
    cd outerspace-go
    ./tests/run_http_tests.sh --recording

    The HTTP test script drives the requests that become the exported production-style trace.

  4. 4. Stop the recording, then run with mocks
    cd outerspace-go
    proxymock mock -- go run main.go

    The mocked run should no longer need live outbound dependencies.

  5. 5. Replay the same traffic against a change
    cd outerspace-go
    proxymock replay --test-against http://localhost:8080

    Use replay as the regression check before shipping Go changes.

TLS Trust

Go usually respects SSL_CERT_FILE. See the shared Language Configuration page for the exact command and any OpenSSL-specific notes.