# exonlabs/go-utils architecture

> Architecture diagram of the GitHub repository exonlabs/go-utils, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/exonlabs/go-utils
- Repository: https://github.com/exonlabs/go-utils

## Overview

This repository is a Go utility library rather than a single end-user application. Its principal workflow is for an application to call the package that matches a need—such as configuration, communication, logging, or process management—and receive the package’s result. The graph preserves the major runtime package areas shown in the tree and source index; source excerpts are incomplete, so links are limited to relationships visible in the supplied excerpts or index.

Main entry points: [`pkg/comm/comm.go`](https://github.com/exonlabs/go-utils/blob/master/pkg/comm/comm.go) (Comm interfaces), [`pkg/jconfig/jconfig.go`](https://github.com/exonlabs/go-utils/blob/master/pkg/jconfig/jconfig.go) (JSON config), [`pkg/proc/process.go`](https://github.com/exonlabs/go-utils/blob/master/pkg/proc/process.go) (Process control), [`pkg/proc/tasklet.go`](https://github.com/exonlabs/go-utils/blob/master/pkg/proc/tasklet.go) (Tasklet lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_comm["Communication"]
  node_comm_core["Comm interfaces<br/>[comm.go]"]
  node_network["Network comm<br/>[network.go]"]
  node_serial["Serial comm<br/>[serial.go]"]
  node_socket["Socket comm<br/>[sock.go]"]
  node_comm_utils["Comm logging<br/>[utils.go]"]
end

subgraph group_app["Application Services"]
  node_config["JSON config<br/>[jconfig.go]"]
  node_config_files["Config handlers<br/>[handlers.go]"]
  node_cipher["AES ciphering<br/>[aes.go]"]
  node_console["Console input<br/>[console.go]"]
  node_logging["Logging<br/>[logger.go]"]
  node_formatter["Log formatting<br/>[formatter.go]"]
  node_log_handlers["Log handlers<br/>[handlers.go]"]
end

subgraph group_runtime["Process Runtime"]
  node_process["Process control<br/>[process.go]"]
  node_tasklet["Tasklet lifecycle<br/>[tasklet.go]"]
  node_routines["Routine manager<br/>[routine.go]"]
  node_events["Events<br/>[event.go]"]
  node_queue["FIFO queue<br/>[fifo.go]"]
end

subgraph group_system["System I/O"]
  node_namedpipes["Named pipes<br/>[pipe.go]"]
  node_pipe_os["Pipe OS operations<br/>[pipe_unix.go]"]
  node_process_utils["Unix process tools<br/>[psutils_unix.go]"]
end

subgraph group_common["Common Utilities"]
  node_dictx["Dictionary helpers<br/>[src.go]"]
  node_fsx["Filesystem helpers<br/>[src.go]"]
  node_gx["Generic helpers<br/>[src.go]"]
  node_mapx["Map helpers<br/>[src.go]"]
  node_numx["Number helpers<br/>[src.go]"]
  node_slicex["Slice helpers<br/>[src.go]"]
end

node_application(("Go application"))

node_application -->|"uses interfaces"| node_comm_core
node_application -->|"loads or saves"| node_config
node_application -->|"reads input"| node_console
node_application -->|"logs through"| node_logging
node_application -->|"manages process"| node_process
node_application -->|"exchanges data"| node_namedpipes
node_network -->|"uses interfaces"| node_comm_core
node_serial -->|"uses interfaces"| node_comm_core
node_socket -->|"uses interfaces"| node_comm_core
node_network -->|"logs traffic"| node_comm_utils
node_serial -->|"logs traffic"| node_comm_utils
node_socket -->|"logs traffic"| node_comm_utils
node_config -->|"updates values"| node_dictx
node_config -->|"encrypts values"| node_cipher
node_config -->|"reads and writes"| node_config_files
node_process -->|"registers listener"| node_comm_core
node_process -->|"runs lifecycle"| node_tasklet
node_routines -->|"creates handler"| node_tasklet
node_tasklet -->|"signals lifecycle"| node_events
node_namedpipes -->|"waits on events"| node_events
node_pipe_os -->|"uses helpers"| node_gx

click node_comm_core "https://github.com/exonlabs/go-utils/blob/master/pkg/comm/comm.go"
click node_network "https://github.com/exonlabs/go-utils/blob/master/pkg/comm/netcomm/network.go"
click node_serial "https://github.com/exonlabs/go-utils/blob/master/pkg/comm/serialcomm/serial.go"
click node_socket "https://github.com/exonlabs/go-utils/blob/master/pkg/comm/sockcomm/sock.go"
click node_comm_utils "https://github.com/exonlabs/go-utils/blob/master/pkg/comm/utils.go"
click node_config "https://github.com/exonlabs/go-utils/blob/master/pkg/jconfig/jconfig.go"
click node_config_files "https://github.com/exonlabs/go-utils/blob/master/pkg/jconfig/handlers.go"
click node_cipher "https://github.com/exonlabs/go-utils/blob/master/pkg/ciphering/aes.go"
click node_console "https://github.com/exonlabs/go-utils/blob/master/pkg/console/console.go"
click node_logging "https://github.com/exonlabs/go-utils/blob/master/pkg/logging/logger.go"
click node_formatter "https://github.com/exonlabs/go-utils/blob/master/pkg/logging/formatter.go"
click node_log_handlers "https://github.com/exonlabs/go-utils/blob/master/pkg/logging/handlers.go"
click node_process "https://github.com/exonlabs/go-utils/blob/master/pkg/proc/process.go"
click node_tasklet "https://github.com/exonlabs/go-utils/blob/master/pkg/proc/tasklet.go"
click node_routines "https://github.com/exonlabs/go-utils/blob/master/pkg/proc/routine.go"
click node_events "https://github.com/exonlabs/go-utils/blob/master/pkg/events/event.go"
click node_queue "https://github.com/exonlabs/go-utils/blob/master/pkg/queue/fifo.go"
click node_namedpipes "https://github.com/exonlabs/go-utils/blob/master/pkg/unix/namedpipes/pipe.go"
click node_pipe_os "https://github.com/exonlabs/go-utils/blob/master/pkg/unix/namedpipes/pipe_unix.go"
click node_process_utils "https://github.com/exonlabs/go-utils/blob/master/pkg/unix/psutils/psutils_unix.go"
click node_dictx "https://github.com/exonlabs/go-utils/blob/master/pkg/abc/dictx/src.go"
click node_fsx "https://github.com/exonlabs/go-utils/blob/master/pkg/abc/fsx/src.go"
click node_gx "https://github.com/exonlabs/go-utils/blob/master/pkg/abc/gx/src.go"
click node_mapx "https://github.com/exonlabs/go-utils/blob/master/pkg/abc/mapx/src.go"
click node_numx "https://github.com/exonlabs/go-utils/blob/master/pkg/abc/numx/src.go"
click node_slicex "https://github.com/exonlabs/go-utils/blob/master/pkg/abc/slicex/src.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_comm_core,node_network,node_serial,node_socket,node_comm_utils toneBlue
class node_config,node_config_files,node_cipher,node_console,node_logging,node_formatter,node_log_handlers toneAmber
class node_process,node_tasklet,node_routines,node_events,node_queue toneMint
class node_namedpipes,node_pipe_os,node_process_utils toneRose
class node_dictx,node_fsx,node_gx,node_mapx,node_numx,node_slicex,node_application toneIndigo
```

## Components

### Communication

- [Comm interfaces](https://github.com/exonlabs/go-utils/blob/master/pkg/comm/comm.go): `pkg/comm/comm.go`
- [Network comm](https://github.com/exonlabs/go-utils/blob/master/pkg/comm/netcomm/network.go): `pkg/comm/netcomm/network.go`
- [Serial comm](https://github.com/exonlabs/go-utils/blob/master/pkg/comm/serialcomm/serial.go): `pkg/comm/serialcomm/serial.go`
- [Socket comm](https://github.com/exonlabs/go-utils/blob/master/pkg/comm/sockcomm/sock.go): `pkg/comm/sockcomm/sock.go`
- [Comm logging](https://github.com/exonlabs/go-utils/blob/master/pkg/comm/utils.go): `pkg/comm/utils.go`

### Application Services

- [JSON config](https://github.com/exonlabs/go-utils/blob/master/pkg/jconfig/jconfig.go): `pkg/jconfig/jconfig.go`
- [Config handlers](https://github.com/exonlabs/go-utils/blob/master/pkg/jconfig/handlers.go): `pkg/jconfig/handlers.go`
- [AES ciphering](https://github.com/exonlabs/go-utils/blob/master/pkg/ciphering/aes.go): `pkg/ciphering/aes.go`
- [Console input](https://github.com/exonlabs/go-utils/blob/master/pkg/console/console.go): `pkg/console/console.go`
- [Logging](https://github.com/exonlabs/go-utils/blob/master/pkg/logging/logger.go): `pkg/logging/logger.go`
- [Log formatting](https://github.com/exonlabs/go-utils/blob/master/pkg/logging/formatter.go): `pkg/logging/formatter.go`
- [Log handlers](https://github.com/exonlabs/go-utils/blob/master/pkg/logging/handlers.go): `pkg/logging/handlers.go`

### Process Runtime

- [Process control](https://github.com/exonlabs/go-utils/blob/master/pkg/proc/process.go): `pkg/proc/process.go`
- [Tasklet lifecycle](https://github.com/exonlabs/go-utils/blob/master/pkg/proc/tasklet.go): `pkg/proc/tasklet.go`
- [Routine manager](https://github.com/exonlabs/go-utils/blob/master/pkg/proc/routine.go): `pkg/proc/routine.go`
- [Events](https://github.com/exonlabs/go-utils/blob/master/pkg/events/event.go): `pkg/events/event.go`
- [FIFO queue](https://github.com/exonlabs/go-utils/blob/master/pkg/queue/fifo.go): `pkg/queue/fifo.go`

### System I/O

- [Named pipes](https://github.com/exonlabs/go-utils/blob/master/pkg/unix/namedpipes/pipe.go): `pkg/unix/namedpipes/pipe.go`
- [Pipe OS operations](https://github.com/exonlabs/go-utils/blob/master/pkg/unix/namedpipes/pipe_unix.go): `pkg/unix/namedpipes/pipe_unix.go`
- [Unix process tools](https://github.com/exonlabs/go-utils/blob/master/pkg/unix/psutils/psutils_unix.go): `pkg/unix/psutils/psutils_unix.go`

### Common Utilities

- [Dictionary helpers](https://github.com/exonlabs/go-utils/blob/master/pkg/abc/dictx/src.go): `pkg/abc/dictx/src.go`
- [Filesystem helpers](https://github.com/exonlabs/go-utils/blob/master/pkg/abc/fsx/src.go): `pkg/abc/fsx/src.go`
- [Generic helpers](https://github.com/exonlabs/go-utils/blob/master/pkg/abc/gx/src.go): `pkg/abc/gx/src.go`
- [Map helpers](https://github.com/exonlabs/go-utils/blob/master/pkg/abc/mapx/src.go): `pkg/abc/mapx/src.go`
- [Number helpers](https://github.com/exonlabs/go-utils/blob/master/pkg/abc/numx/src.go): `pkg/abc/numx/src.go`
- [Slice helpers](https://github.com/exonlabs/go-utils/blob/master/pkg/abc/slicex/src.go): `pkg/abc/slicex/src.go`

### Other components

- **Go application**

## Connections

- Go application → Comm interfaces: uses interfaces
- Go application → JSON config: loads or saves
- Go application → Console input: reads input
- Go application → Logging: logs through
- Go application → Process control: manages process
- Go application → Named pipes: exchanges data
- Network comm → Comm interfaces: uses interfaces (evidence: `pkg/comm/netcomm/network.go`)
- Serial comm → Comm interfaces: uses interfaces (evidence: `pkg/comm/serialcomm/serial.go`)
- Socket comm → Comm interfaces: uses interfaces (evidence: `pkg/comm/sockcomm/sock.go`)
- Network comm → Comm logging: logs traffic (evidence: `pkg/comm/netcomm/network.go`)
- Serial comm → Comm logging: logs traffic (evidence: `pkg/comm/serialcomm/serial.go`)
- Socket comm → Comm logging: logs traffic (evidence: `pkg/comm/sockcomm/sock.go`)
- JSON config → Dictionary helpers: updates values (evidence: `pkg/jconfig/jconfig.go`)
- JSON config → AES ciphering: encrypts values (evidence: `pkg/jconfig/jconfig.go`)
- JSON config → Config handlers: reads and writes (evidence: `pkg/jconfig/jconfig.go`)
- Process control → Comm interfaces: registers listener (evidence: `pkg/proc/process.go`)
- Process control → Tasklet lifecycle: runs lifecycle (evidence: `pkg/proc/process.go`)
- Routine manager → Tasklet lifecycle: creates handler (evidence: `pkg/proc/routine.go`)
- Tasklet lifecycle → Events: signals lifecycle (evidence: `pkg/proc/tasklet.go`)
- Named pipes → Events: waits on events (evidence: `pkg/unix/namedpipes/pipe.go`)
- Pipe OS operations → Generic helpers: uses helpers (evidence: `pkg/unix/namedpipes/pipe_unix.go`)
