Documentation ¶
Index ¶
- func GenerateState(desiredState nmstateapi.State, ...) (map[string]nmstateapi.NodeNetworkConfigurationEnactmentCapturedState, ...)
- func GenerateStateWithStateGenerator(stateGenerator NMPolicyGenerator, desiredState nmstateapi.State, ...) (map[string]nmstateapi.NodeNetworkConfigurationEnactmentCapturedState, ...)
- type GenerateStateWithNMPolicy
- type NMPolicyGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateState ¶
func GenerateState(desiredState nmstateapi.State, policySpec nmstateapi.NodeNetworkConfigurationPolicySpec, currentState nmstateapi.State, cachedState map[string]nmstateapi.NodeNetworkConfigurationEnactmentCapturedState) ( map[string]nmstateapi.NodeNetworkConfigurationEnactmentCapturedState, nmstateapi.NodeNetworkConfigurationEnactmentMetaInfo, nmstateapi.State, error)
The method generates the state using the default NMPolicyGenerator
func GenerateStateWithStateGenerator ¶
func GenerateStateWithStateGenerator(stateGenerator NMPolicyGenerator, desiredState nmstateapi.State, policySpec nmstateapi.NodeNetworkConfigurationPolicySpec, currentState nmstateapi.State, cachedState map[string]nmstateapi.NodeNetworkConfigurationEnactmentCapturedState) ( map[string]nmstateapi.NodeNetworkConfigurationEnactmentCapturedState, nmstateapi.NodeNetworkConfigurationEnactmentMetaInfo, nmstateapi.State, error)
The method generates the state using NMPolicyGenerator.GenerateState and then converts the returned value to the match the enactment api
Types ¶
type GenerateStateWithNMPolicy ¶
type GenerateStateWithNMPolicy struct{}
func (GenerateStateWithNMPolicy) GenerateState ¶
func (GenerateStateWithNMPolicy) GenerateState( nmpolicySpec nmpolicytypes.PolicySpec, currentState []byte, cache nmpolicytypes.CachedState, ) (nmpolicytypes.GeneratedState, error)
type NMPolicyGenerator ¶
type NMPolicyGenerator interface { GenerateState( nmpolicySpec nmpolicytypes.PolicySpec, currentState []byte, cache nmpolicytypes.CachedState, ) (nmpolicytypes.GeneratedState, error) }
Click to show internal directories.
Click to hide internal directories.