Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADDED] Timestamp fields to stream and consumer infos #1540

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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