2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
*/
|
|
|
|
|
2020-12-01 15:45:09 +00:00
|
|
|
export default {
|
2022-09-15 08:43:17 +00:00
|
|
|
Name: (item) => item.Name,
|
|
|
|
Node: (item) => item.Node.Node,
|
|
|
|
Tags: (item) => item.Service.Tags || [],
|
|
|
|
ID: (item) => item.Service.ID || '',
|
|
|
|
Address: (item) => item.Address || '',
|
|
|
|
Port: (item) => (item.Service.Port || '').toString(),
|
|
|
|
['Service.Meta']: (item) =>
|
2020-12-18 10:38:15 +00:00
|
|
|
Object.entries(item.Service.Meta || {}).reduce((prev, entry) => prev.concat(entry), []),
|
2022-09-15 08:43:17 +00:00
|
|
|
['Node.Meta']: (item) =>
|
2020-12-18 10:38:15 +00:00
|
|
|
Object.entries(item.Node.Meta || {}).reduce((prev, entry) => prev.concat(entry), []),
|
2020-12-01 15:45:09 +00:00
|
|
|
};
|