apache / cassandra-gocql-driver

GoCQL Driver for Apache Cassandra®
https://cassandra.apache.org/
Apache License 2.0
2.58k stars 621 forks source link

Add query attempt interceptor #1820

Open BenEddy opened 1 month ago

BenEddy commented 1 month ago

As suggested in https://github.com/apache/cassandra-gocql-driver/issues/1786, this PR introduces a QueryAttemptInterceptor interface for intercepting query attempts, which allows clients to inject logic that should apply to all queries e.g. context manipulation, rate limiting, query modification, logging, fault injection, metrics, etc.

Alternative to https://github.com/apache/cassandra-gocql-driver/pull/1810.