event-reporter

command module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

README

event-reporter

event-reporter exposes a simple API over D-BUS which it then stores in a simple embedded database. Queued events are periodically sent to the Cacophony Project API server.

This software is licensed under the GNU General Public License v3.0.

D-BUS API

event-reporter exposes an API at "org.cacophony.Events" on the D-BUS system bus. It a exposes a single method with the following signature:

Queue(details []byte, nanos int64) error

The details argument should contain JSON encoded event details which are compatible with the Cacophony Project events POST API. The nanos argument is the timestamp for the event in number of nanoseconds since 1970-01-01 UTC.

Events sent to this API will be persisted to disk and sent by event-reporter at its next send interval.

Here's an example of how to send to the API using the dbus-send tool:

dbus-send --system --type=method_call --print-reply \
    --dest=org.cacophony.Events \
    /org/cacophony/Events \
    org.cacophony.Events.Queue \
    string:'{"description": {"type": "audioBait", "filename": "foo.mp3"}}' \
    int64:1527629858095250710

Releases

This software uses the GoReleaser tool to automate releases. To produce a release:

  • Ensure that the GITHUB_TOKEN environment variable is set with a Github personal access token which allows access to the Cacophony Project repositories.
  • Tag the release with an annotated tag. For example: git tag -a "v1.4" -m "1.4 release"
  • Push the tag to Github: git push --tags origin
  • Run goreleaser --rm-dist

The configuration for GoReleaser can be found in .goreleaser.yml.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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