1.0.4 • Published 6 years ago

green-connectivity v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

green-connectivity

A connectivity manager agent for AWS Greengrass.

Green application CodeFactor

Current version: 1.0.2

Lead Maintainer: Halim Qarroum

Table of contents

Install

green add npm://green-connectivity

Description

This application acts as a connectivity monitoring agent for AWS Greengrass applications. It exposes an event-based API that can return information about the state of network connectivity associated with an AWS Greengrass Core. It also publishes events on the Greengrass local message broker about state changes related to the network connectivity.

Green applications can use green-connectivity to get informed when Internet connectivity is lost or regained in order to cope with an Internet-less situation.

API

This application exposes an Expressify API which is accessible from any green application locally, but also from the AWS IoT Core service from the cloud remotely. The available API endpoints are documented and described below.

MethodResourceReturn code(s)Payload requiredDescription
GET/status200NoUsing this route, green applications can query the green-connectivity application for the current connectivity status.
SUBSCRIBE/status200NoUsing this route, green applications can subscribe to changes impacting the current connectivity status.

Events

While application can retrieve on demand the current connectivity status, they can also be advertised of any change in the connectivity state by listening, using Expressify, on the /status resource as stated in the API section, which will emit a connectivity.state.change event whenever the connectivity state has changed.

For more information on how to call an Expressify endpoint and subsribe to resources, please read the documentation associated with the expressify framework, and its associated expressify-mqtt strategy which is used in green applications.

See also

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago