INNER CODE UNIT · Go

unixConnStr

Netis/cloud-probe · cpctl/cmd/base.go:134

func unixConnStr() string {
	return "unix://" + Globals.Unix
}

// withRPCTimeout derives a per-RPC context from the parent using the global
// --timeout. For single-shot commands the returned ctx covers the whole call;
// loop commands (ping, stats) should call this per iteration so --timeout
// applies to each RPC and not the total run duration.
func withRPCTimeout(parent context.Context) (context.Context, context.CancelFunc) {
	if Globals.Timeout <= 0 {
		return parent, func() {}
	}
	return context.WithTimeout(parent, Globals.Timeout)
}

func Execute() {
	var err error
	defer func() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…