mirror of
https://github.com/siderolabs/talos.git
synced 2025-09-14 18:31:10 +02:00
This refactors the API to avoid marshaling/unmarshaling config in the most common scenario: when config is loaded from disk and applied to be used. There should be no functional changes. This reduces GC garbage left from the YAML encoding procedure. Fixes #4685 Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
22 lines
606 B
Go
22 lines
606 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package runtime
|
|
|
|
import (
|
|
"github.com/talos-systems/talos/pkg/machinery/config"
|
|
)
|
|
|
|
// Runtime defines the runtime parameters.
|
|
type Runtime interface {
|
|
Config() config.Provider
|
|
LoadAndValidateConfig([]byte) (config.Provider, error)
|
|
SetConfig(config.Provider) error
|
|
CanApplyImmediate(config.Provider) error
|
|
State() State
|
|
Events() EventStream
|
|
Logging() LoggingManager
|
|
NodeName() (string, error)
|
|
}
|