...

Package protoconv

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

Overview ▾

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

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.