hashicorp / hashicorp/consul

Refactor agent check maps

Open
#3,294 0 comments 0 reactions 1 assignee Claimed by @magiconair View on GitHub
theme/internal-cleanup type/enhancement
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

The agent uses several different maps to keep track of the different checks. This complicates the lock handling and makes it easier to forget cases (see #3265). This should be refactored so that the check maps are replaced with a single data structure. This could be a `map[string]struct{...}` or a `map[string]interface{}` with type switching or a separate data structure altogether.

https://github.com/hashicorp/consul/blob/master/agent/agent.go#L109-L129

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.