34 lines
941 B
Plaintext
34 lines
941 B
Plaintext
[
|
|
${
|
|
range(
|
|
env(
|
|
'CONSUL_SESSION_COUNT',
|
|
Math.floor(
|
|
(
|
|
Math.random() * env('CONSUL_SESSION_MAX', 5)
|
|
) + parseInt(env('CONSUL_SESSION_MIN', 1))
|
|
)
|
|
)
|
|
).map(
|
|
function(item, i) {
|
|
// TTL = "" | 10:84600
|
|
return `{
|
|
"ID":"${fake.random.uuid()}",
|
|
"Name":"${fake.hacker.noun()}",
|
|
${typeof location.search.ns !== 'undefined' ? `
|
|
"Namespace": "${location.search.ns}",
|
|
` : ``}
|
|
"Node":"${location.pathname.get(3)}",
|
|
"NodeChecks":["serfHealth"],
|
|
"ServiceChecks": ["${fake.hacker.noun()}Health"],
|
|
"LockDelay":15000000000,
|
|
"Behavior":"${fake.helpers.randomize(['release', 'delete'])}",
|
|
"TTL":"",
|
|
"CreateIndex":2782,
|
|
"ModifyIndex":2782
|
|
}`;
|
|
}
|
|
)
|
|
}
|
|
]
|