mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-06-25 22:41:24 +02:00
81-seperateprocesses-into-independent-processes
- Fixed errors
This commit is contained in:
parent
f9b8b85ec3
commit
a0e7a4a644
@ -240,10 +240,10 @@ func NewSubGraph(name string, label string, graphType GraphType) *Cluster {
|
|||||||
// NewGraph: create a new root graph
|
// NewGraph: create a new root graph
|
||||||
func NewGraph(label string, graphType GraphType) *RootGraph {
|
func NewGraph(label string, graphType GraphType) *RootGraph {
|
||||||
return &RootGraph{
|
return &RootGraph{
|
||||||
Type: graphType,
|
Type: graphType,
|
||||||
Label: label,
|
Label: label,
|
||||||
clusters: map[string]*Cluster{},
|
clusters: map[string]*Cluster{},
|
||||||
nodes: make(map[string]*Node),
|
nodes: make(map[string]*Node),
|
||||||
edges: make(map[string]Edge)
|
edges: make(map[string]Edge),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/rpc"
|
"net/rpc"
|
||||||
|
ipcRPC "net/rpc"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/tim-beatham/smegmesh/pkg/ctrlserver"
|
"github.com/tim-beatham/smegmesh/pkg/ctrlserver"
|
||||||
@ -75,7 +76,7 @@ type DeleteServiceArgs struct {
|
|||||||
// PutAliasArgs: args to assign an alias to a node
|
// PutAliasArgs: args to assign an alias to a node
|
||||||
type PutAliasArgs struct {
|
type PutAliasArgs struct {
|
||||||
// Alias: represents the alias of the node
|
// Alias: represents the alias of the node
|
||||||
Alias string
|
Alias string
|
||||||
// MeshId: represents the meshID of the node
|
// MeshId: represents the meshID of the node
|
||||||
MeshId string
|
MeshId string
|
||||||
}
|
}
|
||||||
@ -85,10 +86,9 @@ type PutDescriptionArgs struct {
|
|||||||
// Description: descriptio to add to the network
|
// Description: descriptio to add to the network
|
||||||
Description string
|
Description string
|
||||||
// MeshID to add to the mesh network
|
// MeshID to add to the mesh network
|
||||||
MeshId string
|
MeshId string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// GetMeshReply: ipc reply to get the mesh network
|
// GetMeshReply: ipc reply to get the mesh network
|
||||||
type GetMeshReply struct {
|
type GetMeshReply struct {
|
||||||
Nodes []ctrlserver.MeshNode
|
Nodes []ctrlserver.MeshNode
|
||||||
@ -104,7 +104,7 @@ type QueryMesh struct {
|
|||||||
// MeshId: id of the mesh to query
|
// MeshId: id of the mesh to query
|
||||||
MeshId string
|
MeshId string
|
||||||
// JMESPath: query string to query
|
// JMESPath: query string to query
|
||||||
Query string
|
Query string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientIpc: Framework to invoke ipc calls to the daemon
|
// ClientIpc: Framework to invoke ipc calls to the daemon
|
||||||
@ -132,11 +132,11 @@ type ClientIpc interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type SmegmeshIpc struct {
|
type SmegmeshIpc struct {
|
||||||
client *ipc.Client
|
client *ipcRPC.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewClientIpc() (*SmegmeshIpc, error) {
|
func NewClientIpc() (*SmegmeshIpc, error) {
|
||||||
client, err := ipcRpc.DialHTTP("unix", SockAddr)
|
client, err := ipcRPC.DialHTTP("unix", SockAddr)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user