grpc

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "grpc"

Variables

This section is empty.

Functions

func BuildClientConfigIndex

func BuildClientConfigIndex(dataCfg *conf.Data) (map[string]*conf.Data_Client_Endpoint, error)

BuildClientConfigIndex 预构建 gRPC 客户端配置索引,避免热路径重复遍历配置列表。

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection gRPC 连接封装,实现 runtime.Connection。 conn 在构造后不可变,无需互斥锁保护。

func NewConnection

func NewConnection(conn *gogrpc.ClientConn) *Connection

func (*Connection) Close

func (g *Connection) Close() error

Close 关闭底层 gRPC 连接并释放所有资源。

func (*Connection) IsHealthy

func (g *Connection) IsHealthy() bool

func (*Connection) Value

func (g *Connection) Value() any

type Plugin

type Plugin struct{}

func (*Plugin) Build

func (*Plugin) Type

func (p *Plugin) Type() string

Jump to

Keyboard shortcuts

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