govpp is a go binding for the vpp api
This repo provides the go binding for a version of vpp.
import "github.com/networkservicemesh/govpp/binapi"
This repo also provides minimal docker container for running vpp:
Whenever a combination of VPP_VERSION and cherrypicks/patches is used to build govpp/vpp docker container, they will be tagged in the docker repo. The corresponding tag will be laid on the main branch containing the corresponding binapi.
So simply run in the same directory as your go.mod file:
go get github.com/networkservicemesh/govpp/binapi@${tag}
Where ${tag}
is the tag of the govpp/vpp container you are consuming.
For example:
go get github.com/networkservicemesh/govpp/binapi@v21.06.0-9-16f166164
To set your go dependency for govpp to match the docker container you are using.
If you want a version of VPP, you can fork this repo and add it yourself. Because things are very heavily patterned and generated, its really quite easy:
go generate ./...
See [patch/patch.sh]. Simply add your cherrypicks to that file.
If you want to add patches to vpp simply add them with the .patch
suffix to the patch/ directory.
Change the version of govpp in the go.mod file
See How the Magic Works.
govpp
image with docker build . -t ${YOUR_GOVPP_IMAGE_TAG} --target vpp
go generate ./...
to generate new binapi
filescmd-repo
you want to updateDockerfile
: replace govpp
image everywhere with the image you've built on the step 3 (for example, in cmd-forwarder-vpp
here and here)go.mod
: replace github.com/networkservicemesh/govpp
with govpp
version which uses newly generated binapi
files (from the step 4)cmd-repo
image