grpc-api

module
v0.0.0-...-5f7c3dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2023 License: MIT

README

BMS gRPC API

This repository contains the gRPC API through which monitors report their measurements to the BMS server.

Currently this API only consists of a storage service (see storage.proto). Commonly usable types are separated into common.proto.

Generated Go Interface

Besides the gRPC API specification this repository also contains automatically derived Go code (in gen/) which clients and servers use as a package to implement.

This code has to be generated when making changes to the *.proto files by running:

$ buf generate

(Make sure that buf is installed.)

When changing the *.proto files, please make sure that you're not adding any lints. You can check your changes by running:

$ buf lint

If you're using VSCode, you can also install the Buf extension which automatically lints your Protobuf files.

API Reference

Running buf generate also generates an API reference which can be found in the docs/ folder.

Usage

To implement a new client that uses this API, you have to import this package:

import bmsapi "github.com/botnet-monitoring/grpc-api/gen"

For how to get started with the actual implementation see e.g. this tutorial or consult our client implementation.

If you just want to send data to BMS, you probably want to use our more ergonomic gRPC client package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL