package
1.14.0
Repository: https://github.com/jacobkranz/grpc-go.git
Documentation: pkg.go.dev

# Functions

GetChannel returns the ChannelMetric for the channel (identified by id).
GetServers returns a slice of server's ServerMetric, along with a boolean indicating whether there's more servers to be queried for.
GetServerSockets returns a slice of server's (identified by id) normal socket's SocketMetric, along with a boolean indicating whether there's more sockets to be queried for.
GetSocket returns the SocketInternalMetric for the socket (identified by id).
GetSocketOption gets the socket option info of the conn.
GetSubChannel returns the SubChannelMetric for the subchannel (identified by id).
GetTopChannels returns a slice of top channel's ChannelMetric, along with a boolean indicating whether there's more top channels to be queried for.
IsOn returns whether channelz data collection is on.
NewChannelzStorage initializes channelz data storage and id generator.
RegisterChannel registers the given channel c in channelz database with ref as its reference name, and add it to the child list of its parent (identified by pid).
RegisterListenSocket registers the given listen socket s in channelz database with ref as its reference name, and add it to the child list of its parent (identified by pid).
RegisterNormalSocket registers the given normal socket s in channelz database with ref as its reference name, and add it to the child list of its parent (identified by pid).
RegisterServer registers the given server s in channelz database.
RegisterSubChannel registers the given channel c in channelz database with ref as its reference name, and add it to the child list of its parent (identified by pid).
RemoveEntry removes an entry with unique channelz trakcing id to be id from channelz database.
TurnOn turns on channelz data collection.

# Variables

EntryPerPage defines the number of channelz entries to be shown on a web page.

# Structs

ChannelInternalMetric defines the struct that the implementor of Channel interface should return from ChannelzMetric().
ChannelMetric defines the info channelz provides for a specific Channel, which includes ChannelInternalMetric and channelz-specific data, such as channelz id, child list, etc.
ServerInternalMetric defines the struct that the implementor of Server interface should return from ChannelzMetric().
ServerMetric defines the info channelz provides for a specific Server, which includes ServerInternalMetric and channelz-specific data, such as channelz id, child list, etc.
SocketInternalMetric defines the struct that the implementor of Socket interface should return from ChannelzMetric().
SocketMetric defines the info channelz provides for a specific Socket, which includes SocketInternalMetric and channelz-specific data, such as channelz id, etc.
SocketOptionData defines the struct to hold socket option data, and related getter function to obtain info from fd.
SubChannelMetric defines the info channelz provides for a specific SubChannel, which includes ChannelInternalMetric and channelz-specific data, such as channelz id, child list, etc.

# Interfaces

Channel is the interface that should be satisfied in order to be tracked by channelz as Channel or SubChannel.
Server is the interface to be satisfied in order to be tracked by channelz as Server.
Socket is the interface that should be satisfied in order to be tracked by channelz as Socket.