remote-jobs

command module
v0.0.0-...-f587dad Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

Custom Go handlers for AWS IoT Jobs

AWS IoT Jobs allows us to define a set of remote operations that we can send to one or more devices. This is critical not just for admin/monitoring tasks but also for us to safely deploy new versions of the software we run on remote devices.

The AWS IoT Device Client is a device agent that implements most of the features available in AWS IoT. It provides a schema for AWS IoT Jobs and reference implementations for AWS managed templates.

New custom handlers can be implemented as a simple bash script. This is fine for simple operations but for complex handlers it can get out of hand pretty quickly. For these cases, writing that logic in Go can result in handlers that are more robust, easier to maintain and test.

This repository contains a collection of custom handlers to carry out common tasks. Each handler is implemented as a sub-command and self-contained in its own package. New tasks can be added by:

  • creating a new package under internal with the command name
  • creating a type that implements subcommands.Command
  • registering that type in main.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
addkey
Package addkey defines a custom job handler that will take 2 parameters: - a public key - a time duration The handler will add the key to the ~/.authorized_keys file where it will be valid according to the expiration time passed in.
Package addkey defines a custom job handler that will take 2 parameters: - a public key - a time duration The handler will add the key to the ~/.authorized_keys file where it will be valid according to the expiration time passed in.

Jump to

Keyboard shortcuts

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