dggarchiver-uploader

command module
v0.0.0-...-66dab85 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: GPL-3.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

dggarchiver-uploader

This is the uploader service of the dggarchiver service that uploads the recorded livestreams.

Features

  1. Supported video platforms:
    • LBRY/Odysee
  2. Adds the uploaded livestreams to an SQLite database
  3. Broadcasts current livestream upload progress via Prometheus
  4. Lua plugin support

Lua

The service can be extended with Lua plugins/scripts. An example can be found in the uploader.example.lua file.

If enabled, the service will call these functions from the specified .lua file:

  • OnReceive(vod) when a livestream recording is received, where vod is the livestream struct
  • OnProgress(progressPercentage) when upload progress is updated, where progressPercentage is the percentage number
  • OnFinish(vod, success) when a livestream recording is uploaded, where vod is the livestream struct, and success is the boolean signifying success
  • OnInsert(vod, success) when a livestream recording has been added to the SQLite database, where vod is the livestream struct, and success is the boolean signifying success

After the functions are done executing, the service will check the global ReceiveResponse, ProgressResponse, FinishResponse and InsertResponse variables for errors, before returning the struct. The struct's fields are:

type LuaResponse struct {
	Filled  bool
	Error   bool
	Message string
	Data    map[string]interface{}
}

Configuration

The config file location can be set with the CONFIG environment variable. Example configuration can be found below and in the config.example.yaml file.

uploader:
  lbry:
    uri: https://example.com/ # lbry-sdk server uri
    author: example # author name to set for livestreams
    channel_name: example # channel to upload the livestreams to
  sqlite: 
    uri: example.sqlite # path to the SQLite database
  plugins:
    enabled: no
    path: uploader.lua # path to the lua plugin
  verbose: no # increases log verbosity

nats:
  host: nats # nats uri
  topic: archiver # main nats topic

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
⌂ 换网址