MCPcopy Create free account
hub / github.com/eth-easl/dirigent / NewWorkerNode

Function NewWorkerNode

internal/control_plane/workers/worker_node.go:65–75  ·  view source on GitHub ↗
(workerNodeConfiguration core.WorkerNodeConfiguration)

Source from the content-addressed store, hash-verified

63}
64
65func NewWorkerNode(workerNodeConfiguration core.WorkerNodeConfiguration) core.WorkerNodeInterface {
66 return &WorkerNode{
67 Name: workerNodeConfiguration.Name,
68 IP: workerNodeConfiguration.IP,
69 Port: workerNodeConfiguration.Port,
70 CpuCores: workerNodeConfiguration.CpuCores,
71 Memory: workerNodeConfiguration.Memory,
72 LastHeartbeat: time.Now(),
73 endpointMap: synchronization.NewControlPlaneSyncStructure[*core.Endpoint, string](),
74 }
75}
76
77func (w *WorkerNode) GetWorkerNodeConfiguration() core.WorkerNodeConfiguration {
78 return core.WorkerNodeConfiguration{

Callers 1

TestDataPlaneCreationFunction · 0.92

Calls 1

Tested by 1

TestDataPlaneCreationFunction · 0.74