risor-io / risor

Fast and flexible scripting for Go developers and DevOps.
https://risor.io
Apache License 2.0
581 stars 24 forks source link

HTTP servers and supporting Risor config updates #186

Closed myzie closed 5 months ago

myzie commented 5 months ago

Adds new http module functions:

Adds Risor configuration option:

Refactor risor.Config struct in a mostly backwards compatible manner. Made the struct fields private so that using the option functions is the standard way of interacting with it, which was the standard pattern already.

Adds two mutexes to the VM to make two aspects concurrency-safe.

go.mod updates:

go 1.22

toolchain go1.22.0
codecov[bot] commented 5 months ago

Codecov Report

Attention: 205 lines in your changes are missing coverage. Please review.

Comparison is base (6bddcff) 31.41% compared to head (039fe36) 30.83%.

Files Patch % Lines
modules/http/listen.go 28.43% 69 Missing and 4 partials :warning:
modules/http/response_writer.go 51.57% 40 Missing and 6 partials :warning:
vm/vm.go 75.71% 23 Missing and 11 partials :warning:
modules/http/http.go 33.33% 20 Missing :warning:
object/function.go 0.00% 8 Missing :warning:
risor_options.go 81.25% 6 Missing :warning:
vm/options.go 62.50% 6 Missing :warning:
risor_config.go 96.57% 3 Missing and 2 partials :warning:
modules/http/request.go 60.00% 2 Missing and 2 partials :warning:
object/thread.go 71.42% 2 Missing :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #186 +/- ## ========================================== - Coverage 31.41% 30.83% -0.58% ========================================== Files 89 113 +24 Lines 12502 14517 +2015 ========================================== + Hits 3927 4476 +549 - Misses 8067 9483 +1416 - Partials 508 558 +50 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.