Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/jklaiber/govpp

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/jklaiber/govpp

  • v0.0.0-20230713140119-5dcbc7fcd4e5
  • Source
  • Go
  • Socket score

Version published
Created
Source

logo
GoVPP

Latest PkgGoDev CI Test

The GoVPP repository contains Go client libraries, code bindings generator and other toolings for VPP.


Features

  • 🆕 CLI app for interacting with VPP instance and development of VPP API (see GoVPP CLI)
  • 🆕 Extendable code generator supporting custom plugins (see Enhanced Generator)
  • 🆕 Generated RPC client code that handles all boilerplate (see RPC Services)
  • Simple VPP client API that is not dependent on any VPP API semantics (see Stream API)
  • Generator of Go bindings for VPP API schema (see Binapi Generator)
  • Go client library for VPP binary API & Stats API (see VPP API calls)
  • Pure Go implementation of VPP binary API protocol (see socketclient)
  • Efficient reader of VPP Stats data from shared memory (see stats client example)

Quick Start

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

Note For extensive info about using generated RPC client , see RPC Services

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

// Initialize VPP API service client
client := vpe.NewServiceClient(conn)

// Call VPP API service method
reply, err := client.ShowVersion(context.Background(), &vpe.ShowVersion{})
if err != nil {
  // handle err
}
log.Print("Version: ", reply.Version)

See complete code for the example above: examples/rpc-service.

Examples

For complete code examples demonstrating vrious GoVPP features, please refer to the examples directory.

Documentation

Refer to User Guide document for info about how to use GoVPP. If you run into any issues or need some help with debugging GoVPP, read our Troubleshooting document.

Go reference docs are available at pkg.go.dev.

For other documentation refer to docs directory.

How to contribute?

Anyone insterested in GoVPP development is welcome to join our bi-weekly 📣 GoVPP Community Meeting, where we accept inputs from projects using GoVPP and have technical discussions about actual development.

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

FAQs

Package last updated on 13 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc