...
1 package server
2
3 import (
4 "context"
5 "fmt"
6
7 "golang.conradwood.net/go-easyops/auth"
8 "golang.conradwood.net/go-easyops/cmdline"
9 "golang.conradwood.net/go-easyops/ctx"
10 )
11
12 func print_inbound_debug(rc *rpccall, myctx context.Context) {
13 if !cmdline.IsDebugRPCServer() {
14 return
15 }
16 s := rc.FullMethod()
17 fmt.Printf("[go-easyops] Debug-RPC[%s]: (builder=%d) Invoked by user %s and service %s\n", s, cmdline.GetContextBuilderVersion(), auth.UserIDString(auth.GetUser(myctx)), auth.UserIDString(auth.GetService(myctx)))
18 if auth.GetUser(myctx) == nil {
19 fmt.Printf("[go-easyops] Context: %#v\n", ctx.Context2String(myctx))
20 }
21
22 }
23
View as plain text