open-consul/ui/packages/consul-ui/mock-api/v1/peering/_

33 lines
997 B
Plaintext

{
"ID": "${fake.random.uuid()}",
"Name": "${location.pathname.get(2)}",
"State": "${fake.helpers.randomize([
'ACTIVE',
'PENDING',
'ESTABLISHING',
'FAILING',
'DELETING',
'TERMINATED',
'UNDEFINED'
])}",
"StreamStatus": {
"LastHeartbeat": "${fake.date.past(10).toISOString()}",
"LastReceive": "${fake.date.past(10).toISOString()}",
"LastSend": "${fake.date.past(10).toISOString()}",
"ExportedServices": [${range(0, Math.floor(Math.random() * 10)).map((i) => `"exported-service-${i}"`)}],
"ImportedServices": [${range(0, Math.floor(Math.random() * 10)).map((i) => `"imported-service-${i}"`)}]
},
"PeerID": "${fake.random.uuid()}",
"PeerServerName": "${fake.internet.domainName()}",
"PeerServerAddresses": [
${
range(
env('CONSUL_PEER_ADDRESS_COUNT', Math.floor((Math.random() * 10) + 1))
).map(i => `
"${fake.internet.ip()}:${fake.random.number({min: 0, max: 65535})}"
`)}
],
"CreateIndex": 89,
"ModifyIndex": 89
}