Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions content/docs/godoxy/Setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ To change listening ports, modify `.env`.

</Callout>

<Callout type="info">
`.env.example` lists optional runtime toggles. If GoDoxy crashes with **`SIGILL: illegal instruction`**,
set **`USE_SONIC_JSON=false`** in `.env` (see [Configuring GoDoxy — Runtime process environment](./getting-started/Configuring-GoDoxy#runtime-process-environment)).

</Callout>

1. Prepare a new directory for docker compose and config files.

2. Run setup script inside the directory
Expand Down
3 changes: 0 additions & 3 deletions content/docs/godoxy/getting-started/Basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ Doing this will make your host has only **one** exposed service, which is GoDoxy
| `GODOXY_LOCAL_API_ADDR` | Local API server listening address for unauthenticated access | - | `[host]:port` |
| `GODOXY_HTTP3_ENABLED` | Enable HTTP/3 | `true` | boolean |
| `GODOXY_DEBUG` | Enable debug behaviors and logging | `false` | boolean |
| `USE_SONIC_JSON` | \*Use "bytedance/sonic" library for efficient JSON handling | `true ` | boolean |

\*: For ancient CPUs you may see "SIGILL: illegal instructions" error, please set `USE_SONIC_JSON` to false .

### Authentication

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ if resp.StatusCode != http.StatusOK {
## Related Packages

- `internal/homepage/widgets` - Widget framework and interface
- `github.com/yusing/goutils/strings` - String utilities and JSON helpers (`MarshalJSON`, `NewJSONDecoder`; backend: sonic via `internal/serialization`)
- `github.com/yusing/goutils/strings` - String utilities and JSON helpers (`MarshalJSON`, `NewJSONDecoder`; backend: `encoding/json/v2` via `internal/serialization`)
2 changes: 1 addition & 1 deletion content/docs/impl/internal-jsonstore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,5 @@ if err := strutils.UnmarshalJSON(data, &tmp); err != nil {

- Uses `xsync.Map` for lock-free reads
- Presizes maps based on input data
- JSON via `github.com/yusing/goutils/strings` helpers (in godoxy, sonic is registered as the backend from `internal/serialization`)
- JSON via `github.com/yusing/goutils/strings` helpers (in godoxy, `encoding/json/v2` is registered as the backend from `internal/serialization`)
- Background periodic save plus a save on program exit; unchanged namespaces are skipped
2 changes: 1 addition & 1 deletion content/docs/impl/internal-metrics-period.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ None.
| ------------------------------------------ | ------------------------ |
| `github.com/gin-gonic/gin` | HTTP handling |
| `github.com/yusing/goutils/http/websocket` | WebSocket streaming |
| `github.com/yusing/goutils/strings` | JSON serialization (backend: sonic via `internal/serialization`) |
| `github.com/yusing/goutils/strings` | JSON serialization (backend: `encoding/json/v2` via `internal/serialization`) |
| `github.com/yusing/goutils/task` | Lifetime management |
| `github.com/puzpuzpuz/xsync/v4` | Concurrent value storage |

Expand Down
2 changes: 1 addition & 1 deletion content/docs/impl/internal-metrics-uptime.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ No explicit configuration. The poller uses period package defaults:
| Dependency | Purpose |
| ---------------------------------------- | ---------------- |
| `github.com/lithammer/fuzzysearch/fuzzy` | Keyword matching |
| `github.com/yusing/goutils/strings` | JSON marshaling (backend: sonic via `internal/serialization`) |
| `github.com/yusing/goutils/strings` | JSON marshaling (backend: `encoding/json/v2` via `internal/serialization`) |

### Integration Points

Expand Down
2 changes: 1 addition & 1 deletion content/docs/impl/internal-metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ No explicit configuration. Pollers respect `common.MetricsDisable*` flags:

- `github.com/shirou/gopsutil/v4` - System metrics collection
- `github.com/puzpuzpuz/xsync/v4` - Atomic value storage
- `github.com/yusing/goutils/strings` - JSON serialization helpers (backend: sonic via `internal/serialization`)
- `github.com/yusing/goutils/strings` - JSON serialization helpers (backend: `encoding/json/v2` via `internal/serialization`)

## Observability

Expand Down
12 changes: 1 addition & 11 deletions content/docs/impl/internal-serialization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,7 @@ autocert:
- `github.com/go-playground/validator/v10` - Validation
- `github.com/puzpuzpuz/xsync/v4` - Type cache
- `github.com/yusing/goutils/strings` - Pluggable JSON marshal/unmarshal/streaming API used across godoxy
- `github.com/bytedance/sonic` - Optional JSON backend for that API: registered in `init()` when **`USE_SONIC_JSON`** is true (process env via `env.GetEnvBool`, default **true**).
- Set **`USE_SONIC_JSON=false`** if the binary hits **`SIGILL: illegal instruction`** on hardware that lacks the assumptions Sonic relies on.

### `USE_SONIC_JSON`

| Value | Behavior |
| ---------------- | ----------------------------------------------------------------------------------------------- |
| `true` (default) | `setupSonic()` wires Sonic into `strutils` for marshal, unmarshal, indent, and encoder helpers. |
| `false` | Sonic is not registered; JSON uses whatever default `strutils` provides without explicit setup. |

Documented in repository `.env.example`, `rootless.env.example`, agent compose template (`agent/pkg/agent/templates/agent.compose.yml.tmpl`), and `scripts/install-agent.sh`.
- `encoding/json/v2` and `encoding/json/jsontext` - JSON backend registered in `init()` (`setupJSONV2()`). `time.Duration` keeps v1 nanosecond numbers via `encoding/json.FormatDurationAsNano`.

### Internal Dependencies

Expand Down