worryg0d commented on code in PR #1929:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1929#discussion_r2904276341


##########
metadata.go:
##########
@@ -475,14 +493,32 @@ func refreshSchemas(session *Session) error {
        } else {
                for _, createdKeyspace := range newKeyspaces {
                        
session.policy.KeyspaceChanged(KeyspaceUpdateEvent{Keyspace: createdKeyspace, 
Change: SchemaChangeTypeCreated})
+                       if session.keyspaceChangeListener != nil && 
session.initialized() {
+                               
session.keyspaceChangeListener.OnKeyspaceCreated(KeyspaceCreatedEvent{Keyspace: 
keyspaceMeta[createdKeyspace]})
+                       }
                }
                for _, droppedKeyspace := range droppedKeyspaces {
                        
session.policy.KeyspaceChanged(KeyspaceUpdateEvent{Keyspace: droppedKeyspace, 
Change: SchemaChangeTypeDropped})
+                       if session.keyspaceChangeListener != nil && 
session.initialized() {
+                               
session.keyspaceChangeListener.OnKeyspaceDropped(KeyspaceDroppedEvent{Keyspace: 
oldKeyspaceMeta[droppedKeyspace]})
+                       }
                }
                for _, updatedKeyspace := range updatedKeyspaces {
                        
session.policy.KeyspaceChanged(KeyspaceUpdateEvent{Keyspace: updatedKeyspace, 
Change: SchemaChangeTypeUpdated})
+                       if session.keyspaceChangeListener != nil && 
session.initialized() {
+                               
session.keyspaceChangeListener.OnKeyspaceUpdated(KeyspaceUpdatedEvent{

Review Comment:
   Makes sense. What do you think about adding an `On` prefix to each of the 
event structs?
   ```go
   OnKeyspaceUpdated(OnKeyspaceUpdatedEvent)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to