All Projects → FDio → govpp

FDio / govpp

Licence: Apache-2.0 license
Go toolset for the VPP.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to govpp

Go Nsq
The official Go package for NSQ
Stars: ✭ 2,045 (+1618.49%)
Mutual labels:  client-library
dpdk engineer manual
【冲破内核瓶颈,让I/O性能飙升】DPDK工程师手册,官方文档,最新视频,开源项目,实战案例,论文,大厂内部ppt,知名工程师一览表
Stars: ✭ 535 (+349.58%)
Mutual labels:  vpp
streamr-client-javascript
JS library for interacting with Streamr APIs: publishing and subscribing to data, creating streams, etc.
Stars: ✭ 35 (-70.59%)
Mutual labels:  client-library
Node Sparkpost
SparkPost client library for Node.js
Stars: ✭ 177 (+48.74%)
Mutual labels:  client-library
Alpaca
Given a web API, Generate client libraries in node, php, python, ruby
Stars: ✭ 2,447 (+1956.3%)
Mutual labels:  client-library
vpp-base
🐳 Docker images ready for running, building and testing VPP.
Stars: ✭ 15 (-87.39%)
Mutual labels:  vpp
Gitlabapiclient
GitLab API client
Stars: ✭ 138 (+15.97%)
Mutual labels:  client-library
js-client-library
TimeTac Client Library is a thin wrapper for client to make api request.
Stars: ✭ 11 (-90.76%)
Mutual labels:  client-library
Jreactive 8583
Java Client & Server for ISO8583 & Netty
Stars: ✭ 248 (+108.4%)
Mutual labels:  client-library
kubernetes-client-lambda
one-line kubernetes client: light-weight, lambda-styled, easy-testing. For a simplified kubernetes programming.
Stars: ✭ 47 (-60.5%)
Mutual labels:  client-library
Php Sparkpost
SparkPost client library for PHP
Stars: ✭ 190 (+59.66%)
Mutual labels:  client-library
Iyzipay Php
iyzipay api php client
Stars: ✭ 205 (+72.27%)
Mutual labels:  client-library
java-binance-api
Java Binance API Client
Stars: ✭ 72 (-39.5%)
Mutual labels:  client-library
Docker Java
Java Docker API Client
Stars: ✭ 2,166 (+1720.17%)
Mutual labels:  client-library
ably-cocoa
iOS, tvOS and macOS Objective-C and Swift client library SDK for Ably realtime messaging service
Stars: ✭ 33 (-72.27%)
Mutual labels:  client-library
Rosnodejs
Client library for writing ROS nodes in JavaScript with nodejs
Stars: ✭ 145 (+21.85%)
Mutual labels:  client-library
TNSR IDS
IDS using a port mirror, Snort and an alert -> RESTCONF utility
Stars: ✭ 30 (-74.79%)
Mutual labels:  vpp
iyzipay-ruby
iyzipay api ruby client
Stars: ✭ 37 (-68.91%)
Mutual labels:  client-library
ably-php
PHP client library SDK for Ably realtime messaging service
Stars: ✭ 41 (-65.55%)
Mutual labels:  client-library
iyzipay-dotnet-client
iyzipay api .net framework and .net core client
Stars: ✭ 30 (-74.79%)
Mutual labels:  client-library

GoVPP

CI Latest PkgGoDev

The GoVPP repository contains a Go client library for interacting with the VPP API,
generator for Go bindings of the VPP binary API and various other tooling for the VPP.


Migration to GitHub

The GoVPP project has been recently migrated to :octocat: GitHub.

What has changed?

  • Go module path has changed from git.fd.io/govpp.git to go.fd.io/govpp.
    • The final release for the old path is v0.5.0.
    • The new module can be imported using go get go.fd.io/govpp@latest.
  • Repository location has changed from Gerrit to GitHub.

How to contribute?

  • Contribute code by submitting a Pull Request.
  • Report bugs by opening an Issue.
  • Ask questions & open discussions by starting a Discussion.

Documentation

Go reference is available at https://pkg.go.dev/go.fd.io/govpp. More documentation can be found under docs directory.

Examples

Here is a list of code examples with short description of demonstrated GoVPP functionality.

  • api-trace - trace sent/received messages
  • binapi-types - using common types from generated code
  • multi-vpp - connect to multiple VPP instances
  • perf-bench - very basic performance test for measuring throughput
  • rpc-service - effortless way to call VPP API via RPC client
  • simple-client - send and receive VPP API messages using GoVPP API directly
  • stats-client - client for retrieving VPP stats data
  • stream-client - using new stream API to call VPP API

All code examples can be found under examples directory.

Quick Start

Below are short code samples showing a GoVPP client interacting with the VPP API.

Using RPC client

Here is a code sample of an effortless way for calling the VPP API by using a generated RPC client.

// Connect to VPP API socket
conn, err := govpp.Connect("/run/vpp/api.sock")
if err != nil {
  // handle err
}
defer conn.Disconnect()

// Init vpe service client
client := vpe.NewServiceClient(conn)

reply, err := client.ShowVersion(context.Background(), &vpe.ShowVersion{})
if err != nil {
  // handle err
}

log.Print("Version: ", reply.Version)

Complete example in rpc-service.

Using messages directly

Here is a code sample of a low-level way to send/receive messages to/from the VPP by using a Channel.

// Connect to the VPP API socket
conn, err := govpp.Connect("/run/vpp/api.sock")
if err != nil {
	// handle err
}
defer conn.Disconnect()

// Open a new channel
ch, err := conn.NewAPIChannel()
if err != nil {
  // handle err
}
defer ch.Close()

// Prepare messages
req := &vpe.ShowVersion{}
reply := &vpe.ShowVersionReply{}

// Send the request
if err := ch.SendRequest(req).ReceiveReply(reply); err != nil {
	// handle err
}

log.Print("Version: ", reply.Version)

For a complete example see simple-client.

Repository Structure

Here is a brief overview of the repository structure.

  • govpp - the entry point for the GoVPP client
    • adapter - VPP binary & stats API interface
      • mock - Mock adapter used for testing
      • socketclient - Go implementation of VPP API client for unix socket
      • statsclient - Go implementation of VPP Stats client for shared memory
    • api - GoVPP client API
    • binapi - generated Go bindings for the latest VPP release
    • binapigen - library for generating code from VPP API
    • cmd
    • codec - handles encoding/decoding of generated messages into binary form
    • core - implementation of the GoVPP client
    • docs - user & developer documentation
    • examples - examples demonstrating GoVPP functionality
    • proxy - contains client/server implementation for proxy
    • test - integration tests, benchmarks and performance tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].