gzaru
06/30/2023, 9:33 PMwatchClient, err := handler.authzedClient.Watch(context.Background(), &v1.WatchRequest{
OptionalObjectTypes: []string{},
})
if err != nil {
fmt.Println("err: %w", err)
}
go func() {
for {
response, err := watchClient.Recv()
if err != nil {
fmt.Println("failed to receive watch update: %v", err)
break
}
if response != nil {
for _, event := range response.Updates {
// Process the event
fmt.Println("Received event: %s", event)
}
}
}
}()
when I get to the receive function, I keep bumping into this error:
rpc error: code = PermissionDenied desc = unknown request
when I do a checkpermission or any other request with the client, everything works perfectly fine. Can someone please sanity check me with what I'm missing? Thank you in advance!gzaru
06/30/2023, 9:33 PMecordell
06/30/2023, 9:34 PMgzaru
06/30/2023, 9:34 PMecordell
06/30/2023, 9:35 PMgzaru
06/30/2023, 9:35 PMgzaru
06/30/2023, 9:35 PMgzaru
06/30/2023, 9:36 PMecordell
06/30/2023, 9:37 PMecordell
06/30/2023, 9:37 PMgzaru
06/30/2023, 9:38 PMgzaru
06/30/2023, 9:39 PM