Skip to content

Commit

Permalink
[ADDED] Timestamp fields to stream and consumer infos
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
  • Loading branch information
piotrpio committed Jan 30, 2024
1 parent 224a544 commit d239755
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions jetstream/consumer_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions jetstream/stream_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit d239755

Please sign in to comment.