File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ trait FS2Channel[F[_]] extends Channel[F] {
24
24
(endpoint :: rest.toList).traverse_(withEndpoint)
25
25
26
26
def open : Resource [F , Unit ]
27
+ def openStream : Stream [F , Unit ]
27
28
}
28
29
29
30
object FS2Channel {
@@ -102,6 +103,7 @@ object FS2Channel {
102
103
def unmountEndpoint (method : String ): F [Unit ] = state.update(_.removeEndpoint(method))
103
104
104
105
def open : Resource [F , Unit ] = Resource .make[F , Unit ](isOpen.set(true ))(_ => isOpen.set(false ))
106
+ def openStream : Stream [F , Unit ] = Stream .resource(open)
105
107
106
108
protected def background [A ](fa : F [A ]): F [Unit ] = supervisor.supervise(fa).void
107
109
protected def reportError (params : Option [Payload ], error : ProtocolError , method : String ): F [Unit ] = ???
You can’t perform that action at this time.
0 commit comments