streamxclient

package
v0.12.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func (*CallOptions) Apply

func (copts *CallOptions) Apply(opts []CallOption)

Apply call options

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL