# Functions
AddTraceEvent adds trace related to the entity with specified id, using the provided TraceEventDesc.
Error logs and adds a trace event if channelz is on.
Errorf logs and adds a trace event if channelz is on.
GetChannel returns the Channel for the channel (identified by id).
GetServer returns the ServerMetric for the server (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 SocketMetrics, along with a boolean indicating whether there's more sockets to be queried for.
GetSocket returns the Socket for the socket (identified by id).
GetSocketOption gets the socket option info of the conn.
GetSubChannel returns the SubChannel 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.
Info logs and adds a trace event if channelz is on.
Infof logs and adds a trace event if channelz is on.
IsOn returns whether channelz data collection is on.
NewChannelMetricForTesting creates a new instance of ChannelMetrics with specified initial values for testing purposes.
NewServerMetricsForTesting returns an initialized ServerMetrics.
RegisterChannel registers the given channel c in the channelz database with target as its target and reference name, and adds it to the child list of its parent.
RegisterServer registers the given server s in channelz database.
RegisterSocket registers the given normal socket s in channelz database with ref as its reference name, and adds it to the child list of its parent (identified by skt.Parent, which must be set).
RegisterSubChannel registers the given subChannel c in the channelz database with ref as its reference name, and adds it to the child list of its parent (identified by pid).
RemoveEntry removes an entry with unique channelz tracking id to be id from channelz database.
ResetMaxTraceEntryToDefault resets the maximum number of trace entries per entity to default.
SetMaxTraceEntry sets maximum number of trace entries per entity (i.e.
TurnOn turns on channelz data collection.
Warning logs and adds a trace event if channelz is on.
Warningf logs and adds a trace event if channelz is on.
# Constants
CtError indicates error level severity of a trace event.
CtInfo indicates info level severity of a trace event.
CtUnknown indicates unknown severity of a trace event.
CtWarning indicates warning level severity of a trace event.
RefChannel indicates the referenced entity is a Channel.
RefListenSocket indicates the referenced entity is a ListenSocket.
RefNormalSocket indicates the referenced entity is a NormalSocket.
RefServer indicates the referenced entity is a Server.
RefSubChannel indicates the referenced entity is a SubChannel.
RefUnknown indicates an unknown entity type, the zero value for this type.
SocketType can be one of these.
SocketType can be one of these.
# Variables
EntriesPerPage defines the number of channelz entries to be shown on a web page.
IDGen is the global channelz entity ID generator.
# Structs
Channel represents a channel within channelz, which includes metrics and internal channelz data, such as channelz id, child list, etc.
ChannelMetrics holds connectivity state, target and call metrics for the channel within channelz.
ChannelTrace provides tracing information for a channel.
EphemeralSocketMetrics are metrics that change rapidly and are tracked outside of channelz.
IDGenerator is an incrementing atomic that tracks IDs for channelz entities.
Server is the channelz representation of a server.
ServerMetrics defines a struct containing metrics for servers.
Socket represents a socket within channelz which includes socket metrics and data related to socket activity and provides methods for managing and interacting with sockets.
SocketMetrics defines the struct that the implementor of Socket interface should return from ChannelzMetric().
SocketOptionData defines the struct to hold socket option data, and related getter function to obtain info from fd.
SubChannel is the channelz representation of a subchannel.
TraceEvent is what the caller of AddTraceEvent should provide to describe the event to be added to the channel trace.
# Interfaces
Entity is implemented by all channelz types.
Identifier is an opaque channelz identifier used to expose channelz symbols outside of grpc.
# Type aliases
RefChannelType is the type of the entity being referenced in a trace event.
Severity is the severity level of a trace event.
SocketType represents the type of socket.