15 lines
314 B
JavaScript
15 lines
314 B
JavaScript
/**
|
|
* picks the correct format for a graphite entry
|
|
* @param {string} [type='graphite'] ['statsd', 'graphite']
|
|
* @return {string} The string template
|
|
*/
|
|
module.exports = type => {
|
|
switch (type) {
|
|
case 'statsd':
|
|
return '%s:%s|t';
|
|
case 'graphite':
|
|
default:
|
|
return '%s %s %s';
|
|
}
|
|
};
|