Class BowireScriptLimits
- Namespace
- Kuestenlogik.Bowire.Scripting
- Assembly
- Kuestenlogik.Bowire.dll
The sandbox's limits. A script that reaches one is stopped and reported,
so a runaway script fails its call rather than the run. The caller fills
them from configuration (Bowire:Scripting:*); these are the values
when it sets none.
public sealed record BowireScriptLimits : IEquatable<BowireScriptLimits>
- Inheritance
-
BowireScriptLimits
- Implements
- Inherited Members
Constructors
BowireScriptLimits()
public BowireScriptLimits()
Properties
MaxRequests
#1111 — how many ctx.sendRequest calls one script may make.
public int MaxRequests { get; init; }
Property Value
MaxStatements
Statements the script may execute.
public int MaxStatements { get; init; }
Property Value
MemoryBytes
Memory the script may allocate, in bytes.
public long MemoryBytes { get; init; }
Property Value
Timeout
Wall-clock time per script.
public TimeSpan Timeout { get; init; }
Property Value
Methods
Equals(BowireScriptLimits?)
public bool Equals(BowireScriptLimits? other)
Parameters
otherBowireScriptLimits
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
FromConfiguration(IConfiguration?)
The limits Bowire:Scripting:TimeoutMs, MemoryMb and
MaxStatements set, the defaults for any left out. One reader for
bowire test and the workbench (#1062), so a limit means the same
in both.
public static BowireScriptLimits FromConfiguration(IConfiguration? cfg)
Parameters
cfgIConfiguration
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(BowireScriptLimits?, BowireScriptLimits?)
public static bool operator ==(BowireScriptLimits? left, BowireScriptLimits? right)
Parameters
leftBowireScriptLimitsrightBowireScriptLimits
Returns
operator !=(BowireScriptLimits?, BowireScriptLimits?)
public static bool operator !=(BowireScriptLimits? left, BowireScriptLimits? right)
Parameters
leftBowireScriptLimitsrightBowireScriptLimits