Closed pawelprazak closed 2 months ago
Definitely!
On Thu 28. Mar 2024 at 14:45, Paweł Prażak @.***> wrote:
In the following use case:
val nginxService = Service( "nginx", ServiceArgs( spec = ServiceSpecArgs( selector = labels,
type
= k8s.core.v1.enums.ServiceSpecType.LoadBalancer, ... ),... )Stack.exports( nginxUrl = nginxService.status.loadBalancer.ingress.head.hostname )
what is missing is:
extension [A](output: besom.types.Output[scala.Option[scala.collection.immutable.List[A]]]) def head: besom.types.Output[scala.Option[A]] = output.map(.map(.head))
We should consider adding lifts for both Output[List[A]] and Output[Option[List[A]]], for the essential methods: i.e.: head, tail, get, etc., but adding every single method does not feel practical.
— Reply to this email directly, view it on GitHub https://github.com/VirtusLab/besom/issues/424, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBVNURZAUNKF3RK2FYEQ7DY2QGHNAVCNFSM6AAAAABFM2E2YSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYTGMRYGUZTONI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
In the following use case:
what is missing is:
We should consider adding lifts for both
Output[List[A]]
andOutput[Option[List[A]]]
, for the essential methods: i.e.:head
,tail
,get
, etc. (mapList
?), but adding every single method does not feel practical.EDIT:
A more complex use case: