Categorygithub.com/demdxx/plugeproc
modulepackage
0.0.0-20221210095258-7a7aaeae19e6
Repository: https://github.com/demdxx/plugeproc.git
Documentation: pkg.go.dev

# README

plugeproc

Build Status Coverage Status Go Report Card GoDoc

Nowadays the data processing application it's a complex of simple microprograms and extensions. In many cases necessary to use some external applications to make processing of data more simpler, for example video or image processing in many case could be solved by special complex free or proprietar applications more efficient then with some libraries and components of the language runtime.

To make this process much easear and safety was writen this extension.

Structure

By design, all extensions must be stored in the special directory and correctly defined manifest.

  • /microprograms directory/
    • /proc-name
      • /.eproc.json - manifest
      • /proc.(sh,py,exe,bash,etc) - optional, depends on manifest
    • /proc-name.eproc.json - alternative defenition without subdirectory

Manifest

Manifest provides basic information how to connect and use extension.

{
  "type": "exec | shell",
  "interface": "default | stream",
  "command": "cat | sed '{{regexp}}'",
  "args": [],
  "params": [
    {"name": "regexp"},
    {"name": "data", "type": "binary", "is_input": true}
  ],
  "output":  {"type": "binary"}
}
  • type - integration type of extension
  • interface - interraction between application and extension
  • command - execution shell command
  • args - arguments of the shell command
  • params - list of parameters for command execution
    • name - name of the parameter
    • type - binary - for input stream only; json - auto converting of input parameter into JSON string
    • is_input - for input stream parameter
  • output - type of the output variable
    • type - binary requires 4 bites LittleEndian order with size of the response; line - one line response with '\n' in the end
  var sResp string
  procs.Get("proc-name").Exec(&sResp, "s/Bash/Perl/", "Bash Scripting Language")
  fmt.Println("Response: " + sResp)

Response: Perl Scripting Language

TODO

  • Add metafile YAML format support
  • Add support goplugin extensions
  • Add support wasm extensions
  • Add support static libraries extensions

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
NewPlugstore from list of external procs.
NewPlugstoreFromLoader interface accessor.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

Plugstore provides access to the list of external proc.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author