Table of Contents

Class DeploymentStrategy

Namespace
Invex.StructuredText.AzureDevopsPipelines.DevopsPipelineModel.Jobs
Assembly
Invex.StructuredText.AzureDevopsPipelines.dll

Deployment strategy for a deployment job.

[Union]
public abstract record DeploymentStrategy
Inheritance
object
DeploymentStrategy
Derived

Remarks

Supports three implementations:

  • RunOnce: Simple run-once deployment strategy
  • Rolling: Rolling deployment strategy
  • Canary: Canary deployment strategy

Methods

Match(Action<RunOnce>, Action<Rolling>, Action<Canary>)

public abstract void Match(Action<DeploymentStrategy.RunOnce> runOnce, Action<DeploymentStrategy.Rolling> rolling, Action<DeploymentStrategy.Canary> canary)

Parameters

runOnce Action<DeploymentStrategy.RunOnce>
rolling Action<DeploymentStrategy.Rolling>
canary Action<DeploymentStrategy.Canary>

MatchCanary(Action<Canary>, Action)

public abstract void MatchCanary(Action<DeploymentStrategy.Canary> canary, Action @else)

Parameters

canary Action<DeploymentStrategy.Canary>
else Action

MatchCanary<TMatchOutput>(Func<Canary, TMatchOutput>, Func<TMatchOutput>)

public abstract TMatchOutput MatchCanary<TMatchOutput>(Func<DeploymentStrategy.Canary, TMatchOutput> canary, Func<TMatchOutput> @else)

Parameters

canary Func<DeploymentStrategy.Canary, TMatchOutput>
else Func<TMatchOutput>

Returns

TMatchOutput

Type Parameters

TMatchOutput

MatchCanary<TState>(TState, Action<TState, Canary>, Action<TState>)

public abstract void MatchCanary<TState>(TState state, Action<TState, DeploymentStrategy.Canary> canary, Action<TState> @else)

Parameters

state TState
canary Action<TState, DeploymentStrategy.Canary>
else Action<TState>

Type Parameters

TState

MatchCanary<TState, TMatchOutput>(TState, Func<TState, Canary, TMatchOutput>, Func<TState, TMatchOutput>)

public abstract TMatchOutput MatchCanary<TState, TMatchOutput>(TState state, Func<TState, DeploymentStrategy.Canary, TMatchOutput> canary, Func<TState, TMatchOutput> @else)

Parameters

state TState
canary Func<TState, DeploymentStrategy.Canary, TMatchOutput>
else Func<TState, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TState
TMatchOutput

MatchRolling(Action<Rolling>, Action)

public abstract void MatchRolling(Action<DeploymentStrategy.Rolling> rolling, Action @else)

Parameters

rolling Action<DeploymentStrategy.Rolling>
else Action

MatchRolling<TMatchOutput>(Func<Rolling, TMatchOutput>, Func<TMatchOutput>)

public abstract TMatchOutput MatchRolling<TMatchOutput>(Func<DeploymentStrategy.Rolling, TMatchOutput> rolling, Func<TMatchOutput> @else)

Parameters

rolling Func<DeploymentStrategy.Rolling, TMatchOutput>
else Func<TMatchOutput>

Returns

TMatchOutput

Type Parameters

TMatchOutput

MatchRolling<TState>(TState, Action<TState, Rolling>, Action<TState>)

public abstract void MatchRolling<TState>(TState state, Action<TState, DeploymentStrategy.Rolling> rolling, Action<TState> @else)

Parameters

state TState
rolling Action<TState, DeploymentStrategy.Rolling>
else Action<TState>

Type Parameters

TState

MatchRolling<TState, TMatchOutput>(TState, Func<TState, Rolling, TMatchOutput>, Func<TState, TMatchOutput>)

public abstract TMatchOutput MatchRolling<TState, TMatchOutput>(TState state, Func<TState, DeploymentStrategy.Rolling, TMatchOutput> rolling, Func<TState, TMatchOutput> @else)

Parameters

state TState
rolling Func<TState, DeploymentStrategy.Rolling, TMatchOutput>
else Func<TState, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TState
TMatchOutput

MatchRunOnce(Action<RunOnce>, Action)

public abstract void MatchRunOnce(Action<DeploymentStrategy.RunOnce> runOnce, Action @else)

Parameters

runOnce Action<DeploymentStrategy.RunOnce>
else Action

MatchRunOnce<TMatchOutput>(Func<RunOnce, TMatchOutput>, Func<TMatchOutput>)

public abstract TMatchOutput MatchRunOnce<TMatchOutput>(Func<DeploymentStrategy.RunOnce, TMatchOutput> runOnce, Func<TMatchOutput> @else)

Parameters

runOnce Func<DeploymentStrategy.RunOnce, TMatchOutput>
else Func<TMatchOutput>

Returns

TMatchOutput

Type Parameters

TMatchOutput

MatchRunOnce<TState>(TState, Action<TState, RunOnce>, Action<TState>)

public abstract void MatchRunOnce<TState>(TState state, Action<TState, DeploymentStrategy.RunOnce> runOnce, Action<TState> @else)

Parameters

state TState
runOnce Action<TState, DeploymentStrategy.RunOnce>
else Action<TState>

Type Parameters

TState

MatchRunOnce<TState, TMatchOutput>(TState, Func<TState, RunOnce, TMatchOutput>, Func<TState, TMatchOutput>)

public abstract TMatchOutput MatchRunOnce<TState, TMatchOutput>(TState state, Func<TState, DeploymentStrategy.RunOnce, TMatchOutput> runOnce, Func<TState, TMatchOutput> @else)

Parameters

state TState
runOnce Func<TState, DeploymentStrategy.RunOnce, TMatchOutput>
else Func<TState, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TState
TMatchOutput

Match<TMatchOutput>(Func<RunOnce, TMatchOutput>, Func<Rolling, TMatchOutput>, Func<Canary, TMatchOutput>)

public abstract TMatchOutput Match<TMatchOutput>(Func<DeploymentStrategy.RunOnce, TMatchOutput> runOnce, Func<DeploymentStrategy.Rolling, TMatchOutput> rolling, Func<DeploymentStrategy.Canary, TMatchOutput> canary)

Parameters

runOnce Func<DeploymentStrategy.RunOnce, TMatchOutput>
rolling Func<DeploymentStrategy.Rolling, TMatchOutput>
canary Func<DeploymentStrategy.Canary, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TMatchOutput

Match<TState>(TState, Action<TState, RunOnce>, Action<TState, Rolling>, Action<TState, Canary>)

public abstract void Match<TState>(TState state, Action<TState, DeploymentStrategy.RunOnce> runOnce, Action<TState, DeploymentStrategy.Rolling> rolling, Action<TState, DeploymentStrategy.Canary> canary)

Parameters

state TState
runOnce Action<TState, DeploymentStrategy.RunOnce>
rolling Action<TState, DeploymentStrategy.Rolling>
canary Action<TState, DeploymentStrategy.Canary>

Type Parameters

TState

Match<TState, TMatchOutput>(TState, Func<TState, RunOnce, TMatchOutput>, Func<TState, Rolling, TMatchOutput>, Func<TState, Canary, TMatchOutput>)

public abstract TMatchOutput Match<TState, TMatchOutput>(TState state, Func<TState, DeploymentStrategy.RunOnce, TMatchOutput> runOnce, Func<TState, DeploymentStrategy.Rolling, TMatchOutput> rolling, Func<TState, DeploymentStrategy.Canary, TMatchOutput> canary)

Parameters

state TState
runOnce Func<TState, DeploymentStrategy.RunOnce, TMatchOutput>
rolling Func<TState, DeploymentStrategy.Rolling, TMatchOutput>
canary Func<TState, DeploymentStrategy.Canary, TMatchOutput>

Returns

TMatchOutput

Type Parameters

TState
TMatchOutput

UnwrapCanary()

public abstract DeploymentStrategy.Canary UnwrapCanary()

Returns

DeploymentStrategy.Canary

UnwrapRolling()

public abstract DeploymentStrategy.Rolling UnwrapRolling()

Returns

DeploymentStrategy.Rolling

UnwrapRunOnce()

public abstract DeploymentStrategy.RunOnce UnwrapRunOnce()

Returns

DeploymentStrategy.RunOnce