From a0e7a4a644268bef4f0fac5388dd888d1472b935 Mon Sep 17 00:00:00 2001 From: Tim Beatham Date: Thu, 4 Jan 2024 13:15:29 +0000 Subject: [PATCH] 81-seperateprocesses-into-independent-processes - Fixed errors --- pkg/dot/dot.go | 12 ++++++------ pkg/ipc/ipc.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/dot/dot.go b/pkg/dot/dot.go index 007810a..fd46c24 100644 --- a/pkg/dot/dot.go +++ b/pkg/dot/dot.go @@ -240,10 +240,10 @@ func NewSubGraph(name string, label string, graphType GraphType) *Cluster { // NewGraph: create a new root graph func NewGraph(label string, graphType GraphType) *RootGraph { return &RootGraph{ - Type: graphType, - Label: label, - clusters: map[string]*Cluster{}, - nodes: make(map[string]*Node), - edges: make(map[string]Edge) + Type: graphType, + Label: label, + clusters: map[string]*Cluster{}, + nodes: make(map[string]*Node), + edges: make(map[string]Edge), } -} \ No newline at end of file +} diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go index 2bc2204..0aa2db3 100644 --- a/pkg/ipc/ipc.go +++ b/pkg/ipc/ipc.go @@ -5,6 +5,7 @@ import ( "net" "net/http" "net/rpc" + ipcRPC "net/rpc" "os" "github.com/tim-beatham/smegmesh/pkg/ctrlserver" @@ -75,7 +76,7 @@ type DeleteServiceArgs struct { // PutAliasArgs: args to assign an alias to a node type PutAliasArgs struct { // Alias: represents the alias of the node - Alias string + Alias string // MeshId: represents the meshID of the node MeshId string } @@ -85,10 +86,9 @@ type PutDescriptionArgs struct { // Description: descriptio to add to the network Description string // MeshID to add to the mesh network - MeshId string + MeshId string } - // GetMeshReply: ipc reply to get the mesh network type GetMeshReply struct { Nodes []ctrlserver.MeshNode @@ -104,7 +104,7 @@ type QueryMesh struct { // MeshId: id of the mesh to query MeshId string // JMESPath: query string to query - Query string + Query string } // ClientIpc: Framework to invoke ipc calls to the daemon @@ -132,11 +132,11 @@ type ClientIpc interface { } type SmegmeshIpc struct { - client *ipc.Client + client *ipcRPC.Client } func NewClientIpc() (*SmegmeshIpc, error) { - client, err := ipcRpc.DialHTTP("unix", SockAddr) + client, err := ipcRPC.DialHTTP("unix", SockAddr) if err != nil { return nil, err