Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit 56c9220

Browse files
committed
narrow the user-visible scope interface for conns and streams
so that they don't accidentally trigger the Done footgun
1 parent 25d4931 commit 56c9220

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

network/conn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type Conn interface {
3232
GetStreams() []Stream
3333

3434
// Scope returns the connection resource scope
35-
Scope() ConnectionScope
35+
Scope() ResourceScope
3636
}
3737

3838
// ConnSecurity is the interface that one can mix into a connection interface to

network/stream.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ type Stream interface {
2727
Conn() Conn
2828

2929
// Scope returns the stream resource scope
30-
Scope() StreamScope
30+
Scope() ResourceScope
3131
}

0 commit comments

Comments
 (0)