Particle ttl and timeout constants (#505)

This commit is contained in:
Dima 2022-04-26 19:10:11 +03:00 committed by GitHub
parent 2901622076
commit 3f17d40af1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -23,6 +23,8 @@ object ValueRaw {
// TODO: move to LiteralRaw
val InitPeerId: LiteralRaw = LiteralRaw("%init_peer_id%", ScalarType.string)
val ParticleTtl: LiteralRaw = LiteralRaw("%ttl%", ScalarType.u32)
val ParticleTimeout: LiteralRaw = LiteralRaw("%timestamp%", ScalarType.u64)
val Nil: LiteralRaw = LiteralRaw("[]", StreamType(BottomType))

View File

@ -42,6 +42,20 @@ case class TransformConfig(
false
)
val particleTtl: ConstantRaw =
ConstantRaw(
"PARTICLE_TTL",
ValueRaw.ParticleTtl,
false
)
val particleTimeout: ConstantRaw =
ConstantRaw(
"PARTICLE_TIMEOUT",
ValueRaw.ParticleTimeout,
false
)
val nil: ConstantRaw =
ConstantRaw(
"nil", // TODO: shouldn't it be NIL?
@ -57,5 +71,5 @@ case class TransformConfig(
)
val constantsList: List[ConstantRaw] =
hostPeerId :: initPeerId :: nil :: lastError :: constants
hostPeerId :: initPeerId :: particleTtl :: particleTimeout :: nil :: lastError :: constants
}