Categorygithub.com/arduino/pluggable-discovery-protocol-handler/v2

# README

Pluggable Discovery Protocol Handler

Go Reference Test Go status Codecov

This project is a library to ease implementation of pluggable discoveries for the Arduino CLI following the official specification.

Reference implementation

The dummy-discovery folder contains a reference pluggable discovery implementation.

Security

If you think you found a vulnerability or other security-related bug in this project, please read our security policy and report the bug to our Security Team 🛡️ Thank you!

e-mail contact: [email protected]

License

Copyright (c) 2021 ARDUINO SA (www.arduino.cc)

The software is released under the GNU General Public License, which covers the main body of the serial-discovery code. The terms of this license can be found at: https://www.gnu.org/licenses/gpl-3.0.en.html

See LICENSE.txt for details.

# Packages

No description provided by the author

# Functions

NewClient create a new pluggable discovery client.
NewServer creates a new discovery server backed by the provided pluggable discovery implementation.

# Structs

Client is a tool that detects communication ports to interact with the boards.
Event is a pluggable discovery event.
Port is a descriptor for a board port.
A Server is a pluggable discovery protocol handler, it must be created using the NewServer function.

# Interfaces

ClientLogger is the interface that must be implemented by a logger to be used in the discovery client.
Discovery is an interface that represents the business logic that a pluggable discovery must implement.

# Type aliases

ErrorCallback is a callback function to signal unrecoverable errors to the client while the discovery is in event mode.
EventCallback is a callback function to call to transmit port metadata when the discovery is in "sync" mode and a new event is detected.