Skip to content

Basic support for definition export#170

Merged
michaelklishin merged 2 commits into
michaelklishin:masterfrom
pathcl:master
Dec 26, 2020
Merged

Basic support for definition export#170
michaelklishin merged 2 commits into
michaelklishin:masterfrom
pathcl:master

Conversation

@pathcl

@pathcl pathcl commented Dec 21, 2020

Copy link
Copy Markdown
Contributor

Hello,

Nice library! thanks for making it open source. I tried to find a way to get whole rabbitmq configuration but couldn't find it.

Idea here is to get full config from rabbitmq runtime. Eventually this could be used along with terraform to eventually import/manage it.

@michaelklishin michaelklishin left a comment

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.

Thank you for taking the time to contribute.

I'm afraid using interfaces for most entity collections is not something we would be interested in doing. This significantly reduces the amount of effort involved but makes it very hard to reason about the structure of responses.

You can use Hop as an example of a library that supports definition import and export in a more type-safe manner.

I'd understand if you decide against spending more time on this PR.

@michaelklishin michaelklishin changed the title add runtime definitions for rabbitmq Basic support for definition export Dec 22, 2020
@pathcl

pathcl commented Dec 22, 2020 via email

Copy link
Copy Markdown
Contributor Author

@michaelklishin

Copy link
Copy Markdown
Owner

@pathcl sure, that's what I had in mind. Thank you. Can we please introduce a new type for global parameters? I can help get it over the finish line do it if you are not familiar with them.

@michaelklishin michaelklishin left a comment

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 is definitely a step in the right direction. Let's also cover global parameters.

Comment thread runtime_parameters.go
}

// 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).

Comment thread runtime_parameters.go
// 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.

@michaelklishin
michaelklishin merged commit e6e3be4 into michaelklishin:master Dec 26, 2020
@michaelklishin

Copy link
Copy Markdown
Owner

Finished this and merged manually. Thank you. We may want to compare the global runtime parameters serialization to that of Hop but I'm reasonably confident in this feature as is.

@michaelklishin michaelklishin added this to the 2.7.0 milestone Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants