joao-r-reis commented on code in PR #1929:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1929#discussion_r2930882053
##########
cluster.go:
##########
@@ -394,6 +397,60 @@ func (cfg *ClusterConfig) filterHost(host *HostInfo) bool {
return !(cfg.HostFilter == nil || cfg.HostFilter.Accept(host))
}
+// MetadataConfig configures driver's internal metadata caching and event
listening.
+type MetadataConfig struct {
+ CacheMode MetadataCacheMode
+
+ // HostListener configures event listeners for host state and topology
changes.
+ HostListener HostListenersConfig
+
+ // SchemaListener configures event listeners for schema changes.
+ //
+ // If CacheMode is Full, listeners will be notified about all schema
changes.
+ //
+ // If CacheMode is KeyspaceOnly, only KeyspaceChangeListener will be
notified,
+ // having other listeners registered will result in an error during
session creation.
+ //
+ // If CacheMode is Disabled, having these listeners will result in an
error during session creation.
+ SchemaListener SchemaListenersConfig
+
+ // SessionReadyListener will be notified when the session is ready to
be used.
+ SessionReadyListener SessionReadyListener
+}
+
+type HostListenersConfig struct {
Review Comment:
Maybe you're right actually, we can keep it like this then
--
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]