genericclient

package
v0.11.3-genericstreaming Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 39 modules, 55 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

Overview

Package genericclient ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamingServiceInfo added in v0.12.0

func StreamingServiceInfo(g generic.Generic) *serviceinfo.ServiceInfo

Types

type BidirectionalStreaming added in v0.12.0

type BidirectionalStreaming interface {
	streaming.Stream
	Send(req interface{}) error
	Recv() (resp interface{}, err error)
}

func NewBidirectionalStreaming added in v0.12.0

func NewBidirectionalStreaming(ctx context.Context, genericCli Client, method string, callOpts ...callopt.Option) (BidirectionalStreaming, error)

type Client

type Client interface {
	generic.Closer

	// GenericCall generic call
	GenericCall(ctx context.Context, method string, request interface{}, callOptions ...callopt.Option) (response interface{}, err error)
}

Client generic client

func NewClient

func NewClient(destService string, g generic.Generic, opts ...client.Option) (Client, error)

NewClient create a generic client

func NewClientWithServiceInfo

func NewClientWithServiceInfo(destService string, g generic.Generic, svcInfo *serviceinfo.ServiceInfo, opts ...client.Option) (Client, error)

NewClientWithServiceInfo create a generic client with serviceInfo

func NewStreamingClient added in v0.12.0

func NewStreamingClient(destService string, g generic.Generic, opts ...client.Option) (Client, error)

func NewStreamingClientWithServiceInfo added in v0.12.0

func NewStreamingClientWithServiceInfo(destService string, g generic.Generic, svcInfo *serviceinfo.ServiceInfo, opts ...client.Option) (Client, error)

type ClientStreaming added in v0.12.0

type ClientStreaming interface {
	streaming.Stream
	Send(req interface{}) error
	CloseAndRecv() (resp interface{}, err error)
}

func NewClientStreaming added in v0.12.0

func NewClientStreaming(ctx context.Context, genericCli Client, method string, callOpts ...callopt.Option) (ClientStreaming, error)

type ServerStreaming added in v0.12.0

type ServerStreaming interface {
	streaming.Stream
	Recv() (resp interface{}, err error)
}

func NewServerStreaming added in v0.12.0

func NewServerStreaming(ctx context.Context, genericCli Client, method string, req interface{}, callOpts ...callopt.Option) (ServerStreaming, error)

Jump to

Keyboard shortcuts

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