Skip to content

Repository files navigation

transport

Go Reference CI License

Universal multi-protocol transport layer for nexss-kernel actions.

Universal multi-protocol transport layer for nexss-kernel actions.

                  ┌─────────────────────────────────┐
                  │      nexss-kernel actions       │
                  └────────────────┬────────────────┘
                                   │
         ┌─────────────────────────┼─────────────────────────┐
         │                         │                         │
         ▼                         ▼                         ▼
   thttp (REST/SSE)         tcli (CLI Tool)          tbus (Event Bus)
   tworker (Workers)        cron (Scheduler)         taskqueue (Task Queue)

Supported Protocols & Transports

  • thttp: Standard HTTP/REST, Server-Sent Events (SSE), streaming NDJSON, and automatic tag-based binding (path, query, header, cookie, form).
  • tcli: CLI commands, subcommands, flag parsing (cli:"flag,f"), positional arguments, and automated --help generation.
  • tbus: Zero-allocation, in-process event bus binding with direct memory routing.
  • tworker: Managed background worker schedules with auto-recovery and isolated request contexts.
  • cron: Precise cron-scheduled jobs using standard cron syntax or duration intervals.
  • taskqueue: In-process task queue with priority lanes (High, Normal, Low), retries, dead-letter queue (DLQ), and panic recovery.
  • mediator: CQRS-style mediator supporting 1:1 typed commands and 1:N event publishing.

Installation

go get github.com/nexssp/transport@latest

Quick Start

1. HTTP Server

server := thttp.New(":8080")
server.Mount([]action.AnyAction{myAction})
server.Do(ctx, nil)

2. CLI Tool

cli := tcli.New()
cli.Mount([]action.AnyAction{myAction})
cli.Do(ctx, nil)

3. Background Workers

workerTransport := tworker.New()
workerTransport.Mount([]action.AnyAction{myAction})
workerTransport.Do(ctx, nil)

About

Universal multi-protocol transport layer for nexss-kernel actions (HTTP/SSE, CLI, bus, workers, cron, task queue, mediator).

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages