simple

command
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 9 Imported by: 0

README

Simple example

This example runs two modules:

  • poller registers settings only.
  • http registers settings and binds repeated labeled HCL route blocks.

Each module lives in its own package under modules/<name>/module.go; main.go only assembles the application.

From the repository root, run:

go run ./examples/simple -config ./examples/simple/application.hcl

Press Ctrl+C to stop the application and observe reverse module shutdown order.

Generate a new starter configuration at a path that does not already exist:

go run ./examples/simple -config ./generated.hcl -generate-config

Generation fails rather than replacing an existing file.

Documentation

Overview

Command simple demonstrates a two-module application loaded from HCL.

Directories

Path Synopsis
modules
http
Package httpmodule demonstrates a module with settings and structured HCL.
Package httpmodule demonstrates a module with settings and structured HCL.
poller
Package poller demonstrates a module configured only through application settings.
Package poller demonstrates a module configured only through application settings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL