14 lines
415 B
Go
14 lines
415 B
Go
|
|
package launcher
|
||
|
|
|
||
|
|
import "time"
|
||
|
|
|
||
|
|
// Config configures a Launcher instance.
|
||
|
|
// The zero value is valid: 15-second component stop timeout.
|
||
|
|
type Config struct {
|
||
|
|
// ComponentStopTimeout is the maximum time allowed for each component's OnStop.
|
||
|
|
// Default: 15 seconds.
|
||
|
|
ComponentStopTimeout time.Duration `env:"EINHERJAR_COMPONENT_STOP_TIMEOUT" envDefault:"15s"`
|
||
|
|
}
|
||
|
|
|
||
|
|
const defaultComponentStopTimeout = 15 * time.Second
|