Traffic shaping
Imports
import (
"net"
"github.com/testground/sdk-go/network"
"github.com/testground/sdk-go/runtime"
"github.com/testground/sdk-go/sync"
)Pre-check and preparation
// runenv is the test instances run environment (runtime.RunEnv).
if !runenv.TestSidecar {
return
}
// client is the *sync.Client
netclient := network.NewClient(client, runenv)Network initialization
Configure traffic shaping
(Optional) Changing your IP address
Apply the configuration
Appendix: What the sidecar does
Last updated