MCPcopy
hub / github.com/grpc/grpc-go / run

Method run

authz/grpc_authz_server_interceptors.go:123–136  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

121}
122
123func (i *FileWatcherInterceptor) run(ctx context.Context) {
124 ticker := time.NewTicker(i.refreshDuration)
125 for {
126 if err := i.updateInternalInterceptor(); err != nil {
127 logger.Warningf("authorization policy reload status err: %v", err)
128 }
129 select {
130 case <-ctx.Done():
131 ticker.Stop()
132 return
133 case <-ticker.C:
134 }
135 }
136}
137
138// updateInternalInterceptor checks if the policy file that is watching has changed,
139// and if so, updates the internalInterceptor with the policy. Unlike the

Callers 1

NewFileWatcherFunction · 0.95

Calls 4

WarningfMethod · 0.65
StopMethod · 0.65
DoneMethod · 0.45

Tested by

no test coverage detected