channelz

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: BSD-2-Clause Imports: 20 Imported by: 0

README

channelz

This go library renders a few webpages for inspecting the gRPC channelz data.

Usage is simple:

channelz.Handle(http.DefaultServeMux, "/channelz/", channelz.ThisProcess())

It is inspired by https://github.com/rantav/go-grpc-channelz. The main feature added was inspecting the current process even if doesn't run a gRPC server.

Documentation

Overview

Package channelz renders a few webpages for inspecting the gRPC channelz data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(mux MuxLike, pathPrefix string, i Interface)

Handle registers our HTTP handlers to your mux. Commonly called as:

channelz.Handle(http.DefaultServeMux, "/channelz/", channelz.ThisProcess())

Types

type Interface

type Interface = grpc_channelz_v1.ChannelzServer

Interface is the set of methods we need to render our webpages.

func RemoteClient

func RemoteClient(cc *grpc.ClientConn) Interface

RemoteClient uses the given ClientConn to talk to a remote gRPC server exposing grpc.channelz.v1.Channelz.

func ThisProcess

func ThisProcess() Interface

ThisProcess returns an Interface that inspects the current process.

type MuxLike

type MuxLike interface {
	Handle(path string, handler http.Handler)
}

MuxLike is the interface that describes what Handle needs from a mux. Notable http.ServeMux implements this interface.

Jump to

Keyboard shortcuts

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