1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-23 21:44:41 +02:00

[feature] stream CloseSend (#2323)

* support stream CloseSend

* move CloseSend into Closer
This commit is contained in:
Johnson C
2021-10-26 22:07:08 +08:00
committed by GitHub
parent af3cfa0a4c
commit d2a51d05c4
29 changed files with 2378 additions and 391 deletions

View File

@@ -64,6 +64,7 @@ type Response interface {
// Stream is the inteface for a bidirectional synchronous stream
type Stream interface {
Closer
// Context for the stream
Context() context.Context
// The request made
@@ -80,6 +81,12 @@ type Stream interface {
Close() error
}
// Closer handle client close
type Closer interface {
// CloseSend closes the send direction of the stream.
CloseSend() error
}
// Option used by the Client
type Option func(*Options)