mozilla-services/lua_sandbox_extensions

Name: lua_sandbox_extensions

Owner: Mozilla Services

Description: Extension packages (sandboxes and modules) for the lua_sandbox project

Created: 2016-07-12 03:56:59.0

Updated: 2018-05-22 22:04:19.0

Pushed: 2018-05-24 16:35:47.0

Homepage: null

Size: 9107

Language: Lua

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Lua Sandbox Extensions

Overview

Package management for Lua Sandbox modules and sandboxes. The goal is to simplify the lua_sandbox core by decoupling the module and businesss logic maintenance and deployment.

Full Documentation

Installation
Prerequisites
Optional (used for documentation)
CMake Build Instructions
git clone https://github.com/mozilla-services/lua_sandbox_extensions.git
cd lua_sandbox_extensions
mkdir release
cd release

# UNIX
cmake -DCMAKE_BUILD_TYPE=release -DENABLE_ALL_EXT=true -DCPACK_GENERATOR=TGZ ..
# or cherry pick using -DEXT_xxx=on i.e. -DEXT_lpeg=on (specifying no
# extension will provide a list of all available extensions)
make
ctest
make packages

# Windows Visual Studio 2013
cmake -DCMAKE_BUILD_TYPE=release -G "NMake Makefiles" -DEXT_lpeg=on ..
nmake
ctest
nmake packages
Docker Images

Docker images are built from the dev and master branches. These images contain hindsight, lua_sandbox and have all of the extensions from this repository installed.

# Get master branch docker image
docker pull mozilla/lua_sandbox_extensions:master

# Get dev branch docker image
docker pull mozilla/lua_sandbox_extensions:dev
Releases
Contributions

Heka Sandbox

Decoder API Convention

Each decoder module should implement a decode function according to the specification below. Also, if the decoder requires configuration options it should look for a table, in the cfg, with a variable name matching the module name (periods replaced by underscores “decoders.foo” -> “decoders_foo”). This naming convention only allows for a single instance of each decoder per sandbox i.e., if you need to parse more than one type of Nginx access log format you should use multiple input sandboxes (one for each).

decode

The decode function should parse, decode, and/or transform the original data and inject one or more Heka messages into the system.

Arguments

Return

Encoder API Convention

Each encoder module should implement an encode function according to the specification below. Also, if the encoder requires configuration options it should look for a table, in the cfg, with a variable name matching the module name (periods replaced by underscores “encoders.foo” -> “encoders_foo”).

encode

The encode function should concatenate, encode, and/or transform the Heka message into a byte array.

Arguments

Return


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.