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

Improve documentation #371

Closed
wants to merge 2 commits into from
Closed

Conversation

collinsonindo
Copy link

As a follow up to #368

This is separated into two commits.

The first commit adds a little extra information on setting up pgagroal to report metrics in a prometheus server and a picture of an instance running

The second is an overview of the files present in the repo and their functions and some gotchas on the way of how they interact, mainly important for developers hence lies in a new directory. It's not fully complete so additional support is welcome

@jesperpedersen
Copy link
Collaborator

Please, split this into 2 pull requests - 1 commit per pull request that is self-contained.

Thanks !

@jesperpedersen jesperpedersen added the documentation Improvements or additions to documentation label Apr 28, 2023
@collinsonindo
Copy link
Author

Hi,

Okay

Seems that commit messages have a specific format, should I use [discussion_link] simple commit message for both of them?

@jesperpedersen
Copy link
Collaborator

Yeah, that would be good, or better create a documentation issue that describes what needs to be improved - and then link to that

Headers are placed in `src/include/*.h` while the corresponding source files are in
`libpgagroal`

### 1. `configuration.h /configuration.c`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lets go with spaces between / for all

Copy link
Author

Choose a reason for hiding this comment

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

Okay


### 1. `configuration.h /configuration.c`

Contains configuration parsing code
Copy link
Collaborator

Choose a reason for hiding this comment

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

Finish documentation with a .

### 3. `management.h/management.c`

This contains code providing boilerplate for reading and writing to sockets
e.g error recovery and connection management.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, this is the management interface

These contain routines to manage two variables `message` and `data`.

The stated variables are global and the functions in `memory` help allocate, set and delete
the above memory.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the code that make pgagroal don't allocate memory at run-time

Copy link
Author

Choose a reason for hiding this comment

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

Nice, I didn't realize that, this seems like a nice feature to mention in the readme


### 6. `pgagroal.h`

Defines mutliple things, shared memories for many other parts (`pipeline shared memory`, `promethus shared memory`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the main file...

Spelling...

@@ -21,7 +21,7 @@ Add a line like the following to `/etc/pgagroal/pgagroal.conf` by editing such f
metrics = 2346
```

Place it withingr the `[pgagroal]` section, like
Place it withing the `[pgagroal]` section, like
Copy link
Collaborator

Choose a reason for hiding this comment

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

with in

@jesperpedersen
Copy link
Collaborator

jesperpedersen commented May 2, 2023

Start with these, but look it all over

@collinsonindo
Copy link
Author

Thanks for the review, modifying and sending as a new pr.

@jesperpedersen
Copy link
Collaborator

Please, no new pull requests. Force push instead.

https://git-scm.com/book/en/v2

@collinsonindo
Copy link
Author

collinsonindo commented May 3, 2023 via email

@jesperpedersen
Copy link
Collaborator

One pull request per change - you can squash and force push in order to update the pull request.

@jesperpedersen
Copy link
Collaborator

Please, reopen if you think it is necessary and it is up-to-date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants