Search

Reference

Configuration schema, HTTP API, native protocol, data types, and persistence format.

Technical specification and API documentation for ztick.

Contents

Configuration

[log]
level = "info"                    # error, warn, info, debug

[controller]
listen = "127.0.0.1:5678"        # TCP server address
tls_cert = "/path/to/cert.pem"   # Optional: enable TLS
tls_key = "/path/to/key.pem"     # Optional: enable TLS

[database]
fsync_on_persist = true          # Flush on every write
framerate = 1                     # Evaluations per second

Protocol

SET <id> <timestamp>                    # Create job
GET <id>                                # Retrieve job
QUERY [<pattern>]                       # List matching jobs (or all)
REMOVE <id>                             # Delete job

RULE SET <id> <pattern> <runner>        # Create rule
REMOVERULE <id>                         # Delete rule
LISTRULES                               # List all rules

CLI (Dump Command)

ztick dump <logfile>                    # Inspect binary logfile
  --format text|json                    # Output format (default: text)
  --compact                             # Show effective state only
  --follow                              # Live tail mode

Data Types

TypePurposeExample
JobScheduled action with timestampapp.backup.daily at 1711612800
RulePattern match + runner mappingbackup.* → SHELL /bin/backup.sh
RunnerExecution targetSHELL, DIRECT
ExecutionJob result (success/failure)Tracking and logging

Persistence

  • Format: Binary (length-prefixed entries)
  • Entries: Job records, rule records, status updates
  • Encoding: Big-endian integers, UTF-8 strings, i64 nanosecond timestamps

See Also

All pages in this section

View original on GitHub