Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
doc.go
main.go

README.md

GRPC remote client example

The example uses vpp-agent as a GRPC server. The configuration uses GRPC service to call remote procedure in the agent to create desired configuration. The example shows how to create data change, resync request and how to read the VPP configuration.

How to run example:

  1. Run vpp-agent with GRPC server enabled - start it with the grpc configuration file with endpoint defined.
vpp-agent --grpc-config=/opt/vpp-agent/dev/grpc.conf
  1. Run GRPC client (example):
go run main.go

Two flags can be set:

  • -address=<address> - for grpc server address/socket-file (otherwise localhost will be used)
  • -socket-type=<type> - options are tcp, tcp4, tcp6, unix or unixpacket. Defaults to tcp if not set

The example creates resync request with configuration which is then updated with data change request. The data is read at the end and number of item read is shown in the log.

You can’t perform that action at this time.