package protoconv

import "google.golang.org/grpc/channelz/internal/protoconv"

Package protoconv supports converting between the internal channelz implementation and the protobuf representation of all the entities.

Index

Functions

func GetChannel

func GetChannel(id int64) (*channelzpb.Channel, error)

GetChannel returns the protobuf representation of the channel with the given ID.

func GetServer

func GetServer(id int64) (*channelzpb.Server, error)

GetServer returns the protobuf representation of the server with the given ID.

func GetServerSockets

func GetServerSockets(serverID, startID int64, len int) (sockets []*channelzpb.SocketRef, end bool)

GetServerSockets returns the protobuf representation of the server (listen) sockets starting at startID (max of len), and returns end=true if no server sockets exist with higher IDs.

func GetServers

func GetServers(startID int64, len int) (servers []*channelzpb.Server, end bool)

GetServers returns the protobuf representation of the servers starting at startID (max of len), and returns end=true if no servers exist with higher IDs.

func GetSocket

func GetSocket(id int64) (*channelzpb.Socket, error)

GetSocket returns the protobuf representation of the socket with the given ID.

func GetSubChannel

func GetSubChannel(id int64) (*channelzpb.Subchannel, error)

GetSubChannel returns the protobuf representation of the subchannel with the given ID.

func GetTopChannels

func GetTopChannels(startID int64, len int) (channels []*channelzpb.Channel, end bool)

GetTopChannels returns the protobuf representation of the channels starting at startID (max of len), and returns end=true if no top channels exist with higher IDs.

Source Files

channel.go server.go socket.go sockopt_linux.go subchannel.go util.go

Version
v1.70.0 (latest)
Published
Jan 23, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
16 minutes ago

Tools for package owners.