Skip to content

feat(endpoint): Support endpoint subdirectories - #314

Merged
ketiltrout merged 1 commit into
chime-upgradefrom
group_endpoints
Oct 2, 2026
Merged

ketiltrout merged 1 commit into
chime-upgradefrom
group_endpoints

Conversation

@ketiltrout

Copy link
Copy Markdown
Member

... for better organization; see #160 and https://github.com/chime-experiment/ch_ansible/issues/182

This adds support to cocod for grouping endpoints in a full directory tree, rather than forcing them all to be in a single directory. Each endpoint sub-tree may also provide metadata about the tree by putting it in a file called __meta.conf (two underscores). Currently all that's taken from such a file is a description and/or summary for use in the client help strings.

Directories which contain no endpoints are ignored.

In the client, each endpoint tree (other that the top-level tree) is represented by a click.Group subclass called EndpointGroup which will recursively create more EndpointGroups and EndpointCommands as required by the structure given to it.

In redis, we represent nested endpoints by replacing directory separators with underscores, so, e.g. cluster/stop would be cluster_stop in redis. This has the side-effect of meaning we don't allow endpoints named both alpha/beta_gamma and alpha_beta/gamma. The daemon will detect this sort of (almost certainly unlikely) endpoint name clash and exit with an error if encountered.

A redo of #224

@ketiltrout
ketiltrout merged commit f237521 into chime-upgrade Oct 2, 2026
5 checks passed
@ketiltrout
ketiltrout deleted the group_endpoints branch October 2, 2026 00:21
@ketiltrout ketiltrout mentioned this pull request Oct 2, 2026
26 of 49 tasks
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