github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/README.md (about) 1 [govpp](https://github.com/FDio/govpp/blob/master/README.md) is a go binding for the vpp api 2 3 This repo provides the go binding for a version of vpp. 4 5 ```go 6 import "github.com/networkservicemesh/govpp/binapi" 7 ``` 8 9 This repo also provides minimal docker container for running vpp: 10 11 - [vpp](https://github.com/networkservicemesh/govpp/pkgs/container/govpp%2Fvpp) 12 13 ## How to match the version of vpp you want to the go bindings. 14 15 Whenever a combination of [VPP_VERSION](https://github.com/networkservicemesh/govpp/blob/main/Dockerfile#L1) 16 and [cherrypicks/patches](https://github.com/networkservicemesh/govpp/blob/main/patch/patch.sh) 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. 17 18 So simply run in the same directory as your go.mod file: 19 20 ```bash 21 go get github.com/networkservicemesh/govpp/binapi@${tag} 22 ``` 23 24 Where `${tag}` is the tag of the govpp/vpp container you are consuming. 25 26 For example: 27 28 ```bash 29 go get github.com/networkservicemesh/govpp/binapi@v21.06.0-9-16f166164 30 ``` 31 32 To set your go dependency for govpp to match the docker container you are using. 33 34 ## What to do if you need a different version of vpp: 35 36 If you want a version of VPP, you can fork *this* repo and add it yourself. 37 Because things are very heavily patterned and generated, its really quite easy: 38 39 1. Change default value for ARG VPP_VERSION in [Dockerfile](https://github.com/networkservicemesh/govpp/blob/main/Dockerfile#L1) to the vpp tag or commit id you want to build. 40 2. ```go generate ./...``` 41 3. Push a PR to your fork and merge it. This will push the govpp/vpp image to your repo. 42 43 ## What to do if you need to cherrypick into VPP 44 45 See [patch/patch.sh]. Simply add your cherrypicks to that file. 46 47 ## What to do if you need to patch vpp: 48 49 If you want to add patches to vpp simply add them with the `.patch` suffix to the [patch/](https://github.com/networkservicemesh/govpp/blob/main/patch/) directory. 50 51 ## What to do if you need a different version of govpp 52 53 Change the version of [govpp in the go.mod file](https://github.com/networkservicemesh/govpp/blob/main/go.mod#L5) 54 55 ## How the magic works ## 56 57 See [How the Magic Works](https://github.com/edwarnicke/govpp/issues/16).