forked from nats-io/nats-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.profile
45 lines (40 loc) · 1.31 KB
/
.profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
alias stan-sub="stan_sub"
alias stan-pub="stan_pub"
alias stan-pub="stan_bench"
alias nats-top="nats_top"
function stan_sub() {
if [ -n "$STAN_CREDS" ] && [ -n "$STAN_CLUSTER" ] && [ -n "$NATS_URL" ]; then
/usr/local/bin/stan-sub -creds $STAN_CREDS -c $STAN_CLUSTER -s $NATS_URL "$@"
elif [ -n "$STAN_CLUSTER" ] && [ -n "$NATS_URL" ]; then
/usr/local/bin/stan-sub -c $STAN_CLUSTER -s $NATS_URL "$@"
else
/usr/local/bin/stan-sub "$@"
fi
}
function stan_pub() {
if [[ -n "$STAN_CREDS" ]] && [[ -n "$STAN_CLUSTER" ]] && [[ -n "$NATS_URL" ]]; then
/usr/local/bin/stan-pub -creds $STAN_CREDS -c $STAN_CLUSTER -s $NATS_URL "$@"
elif [ -n "$STAN_CLUSTER" ] && [ -n "$NATS_URL" ]; then
/usr/local/bin/stan-pub -c $STAN_CLUSTER -s $NATS_URL "$@"
else
/usr/local/bin/stan-pub "$@"
fi
}
function stan_bench() {
if [[ -n "$STAN_CREDS" ]] && [[ -n "$STAN_CLUSTER" ]] && [[ -n "$NATS_URL" ]]; then
/usr/local/bin/stan-bench -creds $STAN_CREDS -c $STAN_CLUSTER -s $NATS_URL "$@"
elif [ -n "$STAN_CLUSTER" ] && [ -n "$NATS_URL" ]; then
/usr/local/bin/stan-bench -c $STAN_CLUSTER -s $NATS_URL "$@"
else
/usr/local/bin/stan-bench "$@"
fi
}
function nats_top() {
if [ -n "$NATS_URL" ]; then
/usr/local/bin/nats-top -s $NATS_URL "$@"
else
/usr/local/bin/nats-top "$@"
fi
}
figlet -p "nats-box"
echo "nats-box v0.8.0"