Raxol.Plugin behaviour (Raxol v0.5.0)

View Source

Defines the behavior for Raxol plugins. Plugins can extend the terminal's functionality by implementing this behavior.

Summary

Callbacks

cleanup(map)

@callback cleanup(map()) :: :ok | {:error, term()}

commands()

@callback commands() :: [{String.t(), function(), map()}]

handle_event(term, map)

@callback handle_event(term(), map()) :: {:ok, map()} | {:error, term()}

init(map)

@callback init(map()) :: {:ok, map()} | {:error, term()}