Skip to content

Commit

Permalink
[ADDED] Return account reservations on AccountInfo (#1511)
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 12, 2024
1 parent 990323d commit cd2f25a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
21 changes: 14 additions & 7 deletions jetstream/jetstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,20 @@ type (

// AccountInfo contains info about the JetStream usage from the current account.
AccountInfo struct {
Memory uint64 `json:"memory"`
Store uint64 `json:"storage"`
Streams int `json:"streams"`
Consumers int `json:"consumers"`
Domain string `json:"domain"`
API APIStats `json:"api"`
Limits AccountLimits `json:"limits"`
Tier
Domain string `json:"domain"`
API APIStats `json:"api"`
Tiers map[string]Tier `json:"tiers"`
}

Tier struct {
Memory uint64 `json:"memory"`
Store uint64 `json:"storage"`
ReservedMemory uint64 `json:"reserved_memory"`
ReservedStore uint64 `json:"reserved_storage"`
Streams int `json:"streams"`
Consumers int `json:"consumers"`
Limits AccountLimits `json:"limits"`
}

// APIStats reports on API calls to JetStream for this account.
Expand Down
12 changes: 7 additions & 5 deletions jsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,13 @@ type AccountInfo struct {
}

type Tier struct {
Memory uint64 `json:"memory"`
Store uint64 `json:"storage"`
Streams int `json:"streams"`
Consumers int `json:"consumers"`
Limits AccountLimits `json:"limits"`
Memory uint64 `json:"memory"`
Store uint64 `json:"storage"`
ReservedMemory uint64 `json:"reserved_memory"`
ReservedStore uint64 `json:"reserved_storage"`
Streams int `json:"streams"`
Consumers int `json:"consumers"`
Limits AccountLimits `json:"limits"`
}

// APIStats reports on API calls to JetStream for this account.
Expand Down

0 comments on commit cd2f25a

Please sign in to comment.