cli

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 29 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli is grpcprocctl: inspect and operate grpcproc nodes through their Inspector, from a terminal or, with `grpcprocctl mcp`, from an AI agent.

Index

Constants

This section is empty.

Variables

View Source
var Version string

Version, when set, overrides the version grpcprocctl reports: -ldflags "-X github.com/floatdrop/grpcproc/tools/cli.Version=v1.2.3". Left empty, it is read from the build: the module version that `go install …@v1.2.3` stamps, or "dev" for a binary built from a checkout.

Functions

func Main

func Main(ctx context.Context, args []string, env Env) int

Main runs grpcprocctl with args (without the program name) and returns the exit code: 0, 1 for a failed command, 2 for bad usage.

Types

type Conn

type Conn struct {
	Addr       string
	Plaintext  bool
	CACert     string
	Cert, Key  string
	ServerName string
}

Conn says how to reach an Inspector.

type Env

type Env struct {
	Stdout, Stderr io.Writer
	Dial           func(ctx context.Context, c Conn) (grpc.ClientConnInterface, func() error, error)
	MCPTransport   mcp.Transport
	// Listen is where grpcprocctl web serves; a TCP listener when nil.
	Listen func(ctx context.Context, addr string) (net.Listener, error)
	Getenv func(string) string
	// BuildInfo is where the version comes from; debug.ReadBuildInfo when nil.
	BuildInfo func() (*debug.BuildInfo, bool)
}

Env is what grpcprocctl talks to. Main fills what is left zero with the process's own: stdout, stderr, a gRPC dial, MCP over stdio.

Jump to

Keyboard shortcuts

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