Coder Social home page Coder Social logo

eve-api's Introduction

EVE Device API

This is the "Device API", for communications between an lf-edge eve edge device and a controller.

See https://www.lfedge.org/projects/eve/

This directory defines the API itself as message definitions, documentation and language-specific bindings.

Contents

Documentation

Documentation is in markdown files in this directory, specifically:

Message definitions

The message definitions are in protobufs in the proto subdirectory.

Language bindings

Language bindings are generated from the protobufs, in language-specific directories:

Using the language-specific bindings

To use the language-specific bindings, import them as libraries to your appropriate language. For example, in go:

import (
    "github.com/lf-edge/eve-api/go/config"
)

Development

To make changes to this API, you:

  1. Edit the specific .proto files in the proto directory, or create new ones, as desired.
  2. Run make proto to generate the language-specific bindings and visualizations.
  3. Commit the changes to the .proto files and the generated files.

The Pull Request process for this repository will regenerate the language-specific bindings and visualizations, and check that no files are missing from the repository.

You can do the above inside a ready-to-run docker container with all of the prerequisites (recommended), or you can install the prerequisites on your local machine.

Either way, you run:

make proto

Language-Specific Bindings

To generate just a single language, run:

make go
# or
make python

Visualizations

In addition to the language-specific libraries, make proto generates visualizations of the protobuf structure, beginning with the root of an edge device config. These are available as .svg, .dot and .png as below. Click to zoom in.

Build Environment

The above make commands can be run either in a devcontainer or locally on your machine.

When run in a devcontainer, all of the prerequsities and their correct versions are set up for you.

Devcontainer

To run inside a devcontainer (recommended), use one of the tools that recognizes and supports devcontainers to provide a development-time environment. These include VS Code, GitHub Codespaces, and the devcontainers CLI.

If using the CLI, run:

devcontainer --workspace-folder . up
devcontainer exec --workspace-folder . make proto

Manual ad-hoc use of devcontainer on Linux

First the devcontainer needs to be built and then run to do the make proto:

docker build -f .devcontainer/Dockerfile -t eve-api-builder .
docker run --rm -v $(pwd):/src -w /src -u $(id -u) eve-api-builder make proto

Local

If running locally, you need to install the prerequisites yourself.

eve-api's People

Contributors

bharani-zededa avatar chethan-zededa avatar christoph-zededa avatar cshari-zededa avatar deitch avatar dolcetriade avatar eriknordmark avatar fabiopalumbo avatar fredrik-jansson-se avatar giggsoff avatar gkodali-zededa avatar kalyan-nidumolu avatar mikem-zed avatar milan-zededa avatar naiming-zededa avatar ohmspectator avatar petr-zededa avatar ppal-zededa avatar rene avatar rene-zededa avatar rouming avatar rvs avatar saurabh-zededa avatar srinibas-zededa avatar temerkhanov avatar uncledecart avatar vk-en avatar zed-rishabh avatar zedvijay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.