MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / WithConfigReloadHook

Function WithConfigReloadHook

internal/api/server.go:171–175  ·  view source on GitHub ↗

WithConfigReloadHook registers a callback used after management saves config changes.

(hook func(context.Context, *config.Config))

Source from the content-addressed store, hash-verified

169
170// WithConfigReloadHook registers a callback used after management saves config changes.
171func WithConfigReloadHook(hook func(context.Context, *config.Config)) ServerOption {
172 return func(cfg *serverOptionConfig) {
173 cfg.configReloadHook = hook
174 }
175}
176
177// Server represents the main API server.
178// It encapsulates the Gin engine, HTTP server, handlers, and configuration.

Callers 1

BuildMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected