-
Notifications
You must be signed in to change notification settings - Fork 1
/
flagHandler.go
33 lines (30 loc) · 1.24 KB
/
flagHandler.go
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
package main
import (
"flag"
)
var (
// FellowNodes String of other nodes in global cluster
FellowNodes *string
// ClusterMode Whether to activate cluster mode features
ClusterMode *bool
// LocalClusterName Name of the local cluster
LocalClusterName *string
// GlobalClusterName Name of the global cluster
GlobalClusterName *string
// NodePort Port of the node
NodePort *int
// NodeInterface Interface of the node
NodeInterface *string
// APIPort the port the API interface runs on
APIPort *int
)
func ParseFlags() {
ClusterMode = flag.Bool("cluster-mode", false, "Bool whether to activate clustering for this node")
FellowNodes = flag.String("fellow-nodes", "", "A CSV of fellow nodes to begin discovery if not first node in cluster. Format: \"x.x.x.x:port,y.y.y.y:port\"")
LocalClusterName = flag.String("local-cluster", "", "Name of the local cluster. Typically this is the name of the Availability Zone")
GlobalClusterName = flag.String("global-cluster", "", "Name of the global cluster.")
NodePort = flag.Int("gossip-port", -1, "Port of the node to join the cluster with")
APIPort = flag.Int("port", -1, "Port for the API to listen to")
NodeInterface = flag.String("iface", "", "Interface IP to use when joining the cluster")
flag.Parse()
}