Skip to content

Commit b136a93

Browse files
authored
Fix the wrong field of the internal stats and internal info (streamnative#907)
1 parent 0535076 commit b136a93

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

pkg/pulsar/utils/data.go

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,22 @@ type PartitionedTopicMetadata struct {
151151
Partitions int `json:"partitions"`
152152
}
153153

154+
type ManagedLedgerInfoLedgerInfo struct {
155+
LedgerID int64 `json:"ledgerId"`
156+
Entries int64 `json:"entries"`
157+
Size int64 `json:"size"`
158+
Timestamp int64 `json:"timestamp"`
159+
Offloaded bool `json:"isOffloaded"`
160+
OffloadedContextUUID string `json:"offloadedContextUuid"`
161+
}
162+
154163
type ManagedLedgerInfo struct {
155-
Version int `json:"version"`
156-
CreationDate string `json:"creationDate"`
157-
ModificationData string `json:"modificationData"`
158-
Ledgers []LedgerInfo `json:"ledgers"`
159-
TerminatedPosition PositionInfo `json:"terminatedPosition"`
160-
Cursors map[string]CursorInfo `json:"cursors"`
164+
Version int `json:"version"`
165+
CreationDate string `json:"creationDate"`
166+
ModificationData string `json:"modificationData"`
167+
Ledgers []ManagedLedgerInfoLedgerInfo `json:"ledgers"`
168+
TerminatedPosition PositionInfo `json:"terminatedPosition"`
169+
Cursors map[string]CursorInfo `json:"cursors"`
161170
}
162171

163172
type NamespacesData struct {
@@ -270,11 +279,13 @@ type PersistentTopicInternalStats struct {
270279
}
271280

272281
type LedgerInfo struct {
273-
LedgerID int64 `json:"ledgerId"`
274-
Entries int64 `json:"entries"`
275-
Size int64 `json:"size"`
276-
Timestamp int64 `json:"timestamp"`
277-
Offloaded bool `json:"isOffloaded"`
282+
LedgerID int64 `json:"ledgerId"`
283+
Entries int64 `json:"entries"`
284+
Size int64 `json:"size"`
285+
Timestamp int64 `json:"timestamp"`
286+
Offloaded bool `json:"offloaded"`
287+
MetaData string `json:"metadata"`
288+
UnderReplicated bool `json:"underReplicated"`
278289
}
279290

280291
type CursorInfo struct {

0 commit comments

Comments
 (0)