Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions runtime_parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,44 @@ type RuntimeParameter struct {
Value interface{} `json:"value"`
}

// RuntimeDefinitions represents rabbitmq runtime configuration.
type RuntimeDefinitions struct {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are called just definitions, not runtime definitions. A lot of them have nothing to do with runtime parameters and do not change at runtime (e.g. product version).

RabbitVersion string `json:"rabbit_version"`
RabbitMQVersion string `json:"rabbitmq_version"`
ProductName string `json:"product_name"`
ProductVersion string `json:"product_version"`
Users []UserInfo
Vhosts []VhostInfo
Permissions []Permissions
TopicPermissions []TopicPermissionInfo
Parameters []RuntimeParameter
GlobalParameters interface{} `json:"global_parameters"`
Policies []PolicyDefinition
Queues []QueueInfo
Exchanges []ExchangeInfo
Bindings []BindingInfo
}

// RuntimeParameterValue represents arbitrary parameter data.
type RuntimeParameterValue map[string]interface{}

//
// GET /api/definitions
//

func (c *Client) ListRuntimeDefinitions() (p *RuntimeDefinitions, err error) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be renamed per the comment above.

req, err := newGETRequest(c, "definitions")
if err != nil {
return nil, err
}

if err = executeAndParseRequest(c, req, &p); err != nil {
return nil, err
}

return p, nil
}

//
// GET /api/parameters
//
Expand Down