From d239755cd27cb9ad387a31c46f9da186d57db587 Mon Sep 17 00:00:00 2001 From: Piotr Piotrowski Date: Tue, 30 Jan 2024 13:26:07 +0100 Subject: [PATCH] [ADDED] Timestamp fields to stream and consumer infos Signed-off-by: Piotr Piotrowski --- jetstream/consumer_config.go | 3 +++ jetstream/stream_config.go | 3 +++ object.go | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/jetstream/consumer_config.go b/jetstream/consumer_config.go index bf4b74de3..0ff4672bc 100644 --- a/jetstream/consumer_config.go +++ b/jetstream/consumer_config.go @@ -72,6 +72,9 @@ type ( // delivery subject of this consumer. This is only applicable to // push-based consumers. PushBound bool `json:"push_bound,omitempty"` + + // TimeStamp indicates when the info was gathered by the server. + TimeStamp time.Time `json:"ts"` } // ConsumerConfig is the configuration of a JetStream consumer. diff --git a/jetstream/stream_config.go b/jetstream/stream_config.go index 5736216b6..e0133d807 100644 --- a/jetstream/stream_config.go +++ b/jetstream/stream_config.go @@ -51,6 +51,9 @@ type ( // Sources is a list of source streams from which this stream collects // data. Sources []*StreamSourceInfo `json:"sources,omitempty"` + + // TimeStamp indicates when the info was gathered by the server. + TimeStamp time.Time `json:"ts"` } // StreamConfig is the configuration of a JetStream stream. diff --git a/object.go b/object.go index 8a9b037b6..0c6647ed9 100644 --- a/object.go +++ b/object.go @@ -1266,7 +1266,6 @@ func (o *objResult) Read(p []byte) (n int, err error) { } r := o.r.(net.Conn) - fmt.Println("read deadline", o.readTimeout) r.SetReadDeadline(readDeadline) n, err = r.Read(p) if err, ok := err.(net.Error); ok && err.Timeout() {