Table of contents
or one by one using the test name. For example, to trigger
Helpful Logging tools
In the course of developing NSM, you will often find yourself wanting to look at logs for various NSM components.
will dump all the logs for all running
nsmd Pods in the cluster (you are going to want to redirect these to a file).
This works for any component in the system.
If you change types.go or any of the .proto files you will need to be able to run
go generate ./... to regenerate the code.
For rerunning the code generation the required dependencies are retrieved with the script:
To regenerate code:
go generate ./...
NOTE: The script
scripts/install-protoc.sh will download a released version of
at the time of this writing there are no
protoc releases built with the
grpc plugin functionality
made use of by the
networkservicemesh project. Specifically, the
generation is missing.
If you need to add new dependencies, run:
go mod tidy
As part of our CI, we run shellcheck on all shell scripts in the repo. If you want to run it locally, you need to install shellcheck
Canonical source on how to build
The .circleci/config.yml file is the canonical source of how to build Network Service Mesh in case this file becomes out of date.
goimports tool since it formats the code in the same style as
go fmt and organizes imports additionally.
To install it run:
To do formatting run:
It may be useful to have
goimports -w -local github.com/networkservicemesh/networkservicemesh installed as on save hook in your editor. Go imports doc page may help you to achieve this.
Static analysis of code
Get code static analyzer tool:
Make sure that tools is installed and can be used from terminal:
If the command above doesn’t work make sure the tool exists in
Checking changes with memory limitation:
GOGC=30 make lint-check-diff
Checking all code in the project:
If you have any unsolvable problem with a concrete linter then consider updating
Table of contents