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

Create constants for the configuration map #449

Closed
cloudxxx8 opened this issue Jan 21, 2021 · 5 comments
Closed

Create constants for the configuration map #449

cloudxxx8 opened this issue Jan 21, 2021 · 5 comments
Assignees
Labels
1-low priority denoting isolated changes enhancement New feature or request ireland

Comments

@cloudxxx8
Copy link
Member

We need:

  • Metadata
  • Data
  • Primary

They will be used in core-data, core-command, device services, and so on.

@cloudxxx8 cloudxxx8 added enhancement New feature or request 1-low priority denoting isolated changes ireland labels Jan 21, 2021
@lenny-goodell
Copy link
Member

@cloudxxx8 , could you explain what configuration map in more detail?

@cloudxxx8
Copy link
Member Author

For example, we have those in the configuration file:

[Clients]
  [Clients.Data]
  Protocol = 'http'
  Host = 'localhost'
  Port = 48080

  [Clients.Metadata]
  Protocol = 'http'
  Host = 'localhost'
  Port = 48081

Then, we need the constants for configuration map key instead of hardcode
https://github.com/edgexfoundry/edgex-go/blob/48f292ecce04635bad45b2dac08c505f02e60d07/internal/core/data/init.go#L61-L62

@lenny-goodell
Copy link
Member

I agree we should have constants.
We have this old similar issue (In Icebox) on edgex-go that wants to use the service keys as the constants for the map keys.
edgexfoundry/edgex-go#2424
@jpwhitemn We should discuss this in Core WG meeting

@cloudxxx8 cloudxxx8 added the hold Intended for PRs we want to flag for ongoing review label Jan 21, 2021
@cloudxxx8
Copy link
Member Author

this issue will be discussed in the next architects' meeting

@jpwhitemn
Copy link
Member

Somewhat related to edgexfoundry/edgex-go#2424

Per the Monthly Architect's meeting of 1/26/21 - it was decided that
We will use service keys in configuration.toml files
Service keys are defined in https://github.com/edgexfoundry/go-mod-core-contracts/blob/master/clients/constants.go

@jpwhitemn jpwhitemn removed the hold Intended for PRs we want to flag for ongoing review label Jan 27, 2021
@cloudxxx8 cloudxxx8 assigned weichou1229 and unassigned judehung Feb 24, 2021
weichou1229 added a commit to weichou1229/go-mod-core-contracts that referenced this issue Feb 24, 2021
Create Primary and Password for configuration's map key

Close edgexfoundry#449

Signed-off-by: weichou <weichou1229@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-low priority denoting isolated changes enhancement New feature or request ireland
Projects
None yet
Development

No branches or pull requests

5 participants