grpc

package
v0.0.0-...-9927619 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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStatsWrapper

func NewStatsWrapper(statsHandler stats.Handler) stats.Handler

NewStatsWrapper wraps grpc stats.Handler and removes healthchecks from tracing.

Types

type ClientConnInterface

type ClientConnInterface interface {
	Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error
	GetState() connectivity.State
	NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)
	Close() error
}

func GetConnection

func GetConnection(host string, safe bool, options ...grpc.DialOption) (ClientConnInterface, error)

TODO: Fix Host <-> Url

type DummyConn

type DummyConn struct{}

func (*DummyConn) Close

func (dc *DummyConn) Close() error

func (*DummyConn) GetState

func (dc *DummyConn) GetState() connectivity.State

func (*DummyConn) Invoke

func (dc *DummyConn) Invoke(_ context.Context, _ string, _ any, _ any, _ ...grpc.CallOption) error

func (*DummyConn) NewStream

func (dc *DummyConn) NewStream(_ context.Context, _ *grpc.StreamDesc, _ string, _ ...grpc.CallOption) (grpc.ClientStream, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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