Thrift 层有一个 testConnectionEmptyRPC 接口,应该可以实现类似 ping 的功能
On 2026/01/30 12:43:31 张磊 wrote:
> database 客户端里面有接口:
>
>
> // Pinger is an optional interface that may be implemented by a [Conn].
> //
> // If a [Conn] does not implement Pinger, the [database/sql.DB.Ping] and
> // [database/sql.DB.PingContext] will check if there is at least one [Conn]
> available.
> //
> // If Conn.Ping returns [ErrBadConn], [database/sql.DB.Ping] and
> [database/sql.DB.PingContext] will remove
> // the [Conn] from pool.
> type Pinger interface {
> Ping(ctx context.Context) error
>
> }
>
>
>
>
> 如何在iotdb-client-go里实现ping 方法
>
>
>
>
>