INNER CODE UNIT · Go

withRPCTimeout

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

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() {
		if err == nil {
			return
		}
		initLogger()
		reportError(slog.Default(), err)
		os.Exit(1)
	}()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…