summaryrefslogtreecommitdiff
path: root/novactl/lib/conn.go
diff options
context:
space:
mode:
Diffstat (limited to 'novactl/lib/conn.go')
-rw-r--r--novactl/lib/conn.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/novactl/lib/conn.go b/novactl/lib/conn.go
new file mode 100644
index 0000000..362c9ed
--- /dev/null
+++ b/novactl/lib/conn.go
@@ -0,0 +1,19 @@
+package lib
+
+import (
+ "google.golang.org/grpc"
+
+ "github.com/discordnova/nova/common/management"
+)
+
+// NewConn creates a connection to the manager
+func NewConn(host string) (*management.ManagementServiceClient, error) {
+ lis, err := grpc.Dial(host, grpc.WithInsecure())
+ if err != nil {
+ return nil, err
+ }
+
+ conn := management.NewManagementServiceClient(lis)
+
+ return &conn, nil
+}