Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithStreamMiddleware ¶
func WithStreamMiddleware(smw streamx.StreamMiddleware) internal_client.Option
WithStreamMiddleware currently is not open for users to use for now so it's include in internal package
Types ¶
type CallOption ¶
type CallOption struct {
// contains filtered or unexported fields
}
CallOption define stream call level option
func WithStreamCloseCallback ¶
func WithStreamCloseCallback(callback StreamCloseCallback) CallOption
WithStreamCloseCallback register StreamCloseCallback
type CallOptions ¶
type CallOptions struct {
StreamCloseCallback []StreamCloseCallback
}
CallOptions define stream call level options
func GetCallOptionsFromCtx ¶
func GetCallOptionsFromCtx(ctx context.Context) *CallOptions
GetCallOptionsFromCtx get CallOptions from context
func NewCtxWithCallOptions ¶
func NewCtxWithCallOptions(ctx context.Context) (context.Context, *CallOptions)
NewCtxWithCallOptions register CallOptions into context
type StreamCloseCallback ¶
type StreamCloseCallback func(err error)
StreamCloseCallback define close callback of the stream
type StreamXClient ¶
type StreamXClient interface {
NewStream(ctx context.Context, method string, streamArgs streamx.StreamArgs, callOptions ...CallOption) (context.Context, streamx.ClientStream, error)
}
StreamXClient implement a streamx interface client
Click to show internal directories.
Click to hide internal directories.