5.3. Script engine

These sub-commands can work on various parts of the Halon script engine. The actual script is managed via the configuration commands.

5.3.1. Shared memory functions

These sub-commands can store, list, fetch and delete key/value pairs from the the script engine’s shared memory API. In order to be able to work with complex Halon script data structures, the values are JSON encoded.

$ halonctl hsl memory store theanswer 42
$ halonctl hsl memory list
theanswer
$ halonctl hsl memory fetch theanswer
42
$ halonctl hsl memory delete theanswer

5.3.2. Cache statement

These sub-commands can list and clear the script engine’s function cache buckets.

$ halonctl hsl cache list
┌───────────┬──────────────────┬──────────┬──────┬────────┬────────┬────────┬──────────┐
│ Namespace │ Function         │ Max size │ Size │   Hits │ Misses │ Evicts │ Hit rate │
├───────────┼──────────────────┼──────────┼──────┼────────┼────────┼────────┼──────────┤
│           │ api_call_http    │   100000 │  845 │ 122799 │   6041 │      0 │  95.3112 │
│           │ http             │    16384 │  747 │   5670 │   2850 │      0 │  66.5493 │
│ test      │ smtp_lookup_rcpt │    16384 │    2 │      1 │     31 │      0 │    3.125 │
└───────────┴──────────────────┴──────────┴──────┴────────┴────────┴────────┴──────────╯
$ halonctl hsl cache clear --function http
1 buckets cleared