diff options
| author | Shulhan <ms@kilabit.info> | 2025-07-21 00:22:50 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-07-23 09:32:16 +0700 |
| commit | 3d4c7b48674cd553ce8f670933af9b609992ae77 (patch) | |
| tree | ae35fc18ed901bcb3d13aa3a0e4abf45287f2579 /server.go | |
| parent | 4d4b26dff03083955871439ee6e0ef9bd07c5a1c (diff) | |
| download | lilin-3d4c7b48674cd553ce8f670933af9b609992ae77.tar.xz | |
wip: implement loading per service configuration
The service configuration is stored under "$BASE_DIR/etc/lilin/service.d".
with ".cfg" as the file extension.
The service configuration use INI format.
Diffstat (limited to 'server.go')
| -rw-r--r-- | server.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -32,7 +32,6 @@ func NewServer(opts ServerOptions) (srv *Server, err error) { srv = &Server{ Options: opts, - worker: newWorker(), } err = srv.Options.init() @@ -40,6 +39,11 @@ func NewServer(opts ServerOptions) (srv *Server, err error) { return nil, fmt.Errorf(`%s: %w`, logp, err) } + srv.worker, err = newWorker(srv.Options.configDir) + if err != nil { + return nil, fmt.Errorf(`%s: %w`, logp, err) + } + var mux = http.NewServeMux() mux.HandleFunc(`GET `+pathAPIServicesSummary, srv.handleServicesSummary) |
