class

Krikri::BasePlugin

Inherits Reference < Object

Base class for all plugins

Constructors

new(config : JSON::Any)
Source

Instance methods

config
Source
config=(config : JSON::Any)
Source
diff_mode=(diff_mode : Bool)
Source
diff_mode?
Source
execute

Abstract method - must be implemented by subclasses

Source
host
Source
host=(host : Host)
Source
params
Source
params=(params : Hash(String, String))
Source
run

Run the plugin and output JSON result

Source
run_and_capture

Same as #run, but returns the JSON result as a String instead of printing it - the piece #run itself needs, and also what the persistent daemon dispatch (SUGGESTED_PERFORMANCE_IMPROVEMENTS.md item #15 - see plugin_daemon.cr) needs: a daemon serves many requests over one long-lived process, so it can never rely on #run's "print to the real STDOUT" behavior - each response has to be framed and written by the daemon loop itself, not by the plugin. Behavior-preserving split: #run is now a one-line wrapper around this, so every existing one-shot call site (every plugin's own driver trailer) is unaffected.

Source
vars
Source
vars=(vars : Hash(String, JSON::Any))
Source