package config import ( "reflect" "time" ) // JSCKServerTimeouts is the server timeouts section's configuration key. const JSCKServerTimeouts string = "timeouts" // JSCServerTimeouts configures the server's timeouts. ShutdownTimeout is how // long shutdown waits for clients to close; 0 or less means it waits until // they have. type JSCServerTimeouts struct { ShutdownTimeout time.Duration `cfg:"shutdown" default:"15s"` } // ---------- Section methods (see Section) ---------- // Map implements Section. func (c JSCServerTimeouts) Map() map[string]any { return mapOf(c) } // Flatten implements Section. func (c JSCServerTimeouts) Flatten() map[string]any { return flattenOf(JSCKServerTimeouts, c) } // TypeOf implements Section. func (c JSCServerTimeouts) TypeOf(key string) (reflect.Kind, error) { return typeOf(c, key) } // ValueOf implements Section. func (c JSCServerTimeouts) ValueOf(key string) (any, error) { return valueOf(c, key) } // SetValue implements Section. func (c *JSCServerTimeouts) SetValue(key string, value any) error { return setValue(c, key, value) }