forked from pinpoint-apm/pinpoint-node-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pinpoint-apm#182] Support ServiceConfig spec( https://github.com/grp…
- Loading branch information
Showing
3 changed files
with
50 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Pinpoint Node.js Agent | ||
* Copyright 2020-present NAVER Corp. | ||
* Apache License v2.0 | ||
*/ | ||
|
||
'use strict' | ||
|
||
class ServiceConfig { | ||
constructor(agentServiceConfig, metadataServiceConfig) { | ||
this.agentServiceConfig = agentServiceConfig | ||
this.metadataServiceConfig = metadataServiceConfig | ||
} | ||
|
||
getAgentServiceConfig() { | ||
return this.agentServiceConfig | ||
} | ||
|
||
getMetadataServiceConfig() { | ||
return this.metadataServiceConfig | ||
} | ||
} | ||
|
||
class ServiceConfigBuilder { | ||
setAgentServiceConfig(config) { | ||
this.agentServiceConfig = config | ||
return this | ||
} | ||
|
||
setMetadataServiceConfig(config) { | ||
this.metadataServiceConfig = config | ||
return this | ||
} | ||
|
||
build() { | ||
return new ServiceConfig(this.agentServiceConfig, this.metadataServiceConfig) | ||
} | ||
} | ||
|
||
module.exports = ServiceConfigBuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.