-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new node manager decoupled from transport layer
- Loading branch information
Showing
69 changed files
with
2,870 additions
and
2,067 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -440,3 +440,5 @@ IMDS | |
tlsca | ||
Lenf | ||
traefik | ||
bprotocolcompute | ||
bprotocolorchestrator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package legacy | ||
|
||
import "github.com/bacalhau-project/bacalhau/pkg/models" | ||
|
||
const ( | ||
HeartbeatMessageType = "heartbeat" | ||
) | ||
|
||
// Heartbeat represents a heartbeat message from a specific node. | ||
// It contains the node ID and the sequence number of the heartbeat | ||
// which is monotonically increasing (reboots aside). We do not | ||
// use timestamps on the client, we rely solely on the server-side | ||
// time to avoid clock drift issues. | ||
type Heartbeat struct { | ||
NodeID string | ||
Sequence uint64 | ||
} | ||
|
||
type RegisterRequest struct { | ||
Info models.NodeInfo | ||
} | ||
|
||
type RegisterResponse struct { | ||
Accepted bool | ||
Reason string | ||
} | ||
|
||
type UpdateInfoRequest struct { | ||
Info models.NodeInfo | ||
} | ||
|
||
type UpdateInfoResponse struct { | ||
Accepted bool | ||
Reason string | ||
} | ||
|
||
type UpdateResourcesRequest struct { | ||
NodeID string | ||
AvailableCapacity models.Resources | ||
QueueUsedCapacity models.Resources | ||
} | ||
|
||
type UpdateResourcesResponse struct{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
package messages | ||
|
||
import "github.com/bacalhau-project/bacalhau/pkg/models" | ||
import ( | ||
"time" | ||
|
||
// Heartbeat represents a heartbeat message from a specific node. | ||
// It contains the node ID and the sequence number of the heartbeat | ||
// which is monotonically increasing (reboots aside). We do not | ||
// use timestamps on the client, we rely solely on the server-side | ||
// time to avoid clock drift issues. | ||
type Heartbeat struct { | ||
NodeID string | ||
Sequence uint64 | ||
} | ||
"github.com/bacalhau-project/bacalhau/pkg/models" | ||
) | ||
|
||
type RegisterRequest struct { | ||
Info models.NodeInfo | ||
// HandshakeRequest is exchanged during initial connection | ||
type HandshakeRequest struct { | ||
NodeInfo models.NodeInfo `json:"NodeInfo"` | ||
StartTime time.Time `json:"StartTime"` | ||
LastOrchestratorSeqNum uint64 `json:"LastOrchestratorSeqNum"` // Last seq received from orchestrator | ||
} | ||
|
||
type RegisterResponse struct { | ||
Accepted bool | ||
Reason string | ||
// HandshakeResponse is sent in response to handshake requests | ||
type HandshakeResponse struct { | ||
Accepted bool `json:"accepted"` | ||
Reason string `json:"reason,omitempty"` | ||
LastComputeSeqNum uint64 `json:"LastComputeSeqNum"` // Last seq received from compute node | ||
} | ||
|
||
type UpdateInfoRequest struct { | ||
Info models.NodeInfo | ||
type HeartbeatRequest struct { | ||
NodeID string `json:"NodeID"` | ||
AvailableCapacity models.Resources `json:"AvailableCapacity"` | ||
QueueUsedCapacity models.Resources `json:"QueueUsedCapacity"` | ||
LastOrchestratorSeqNum uint64 `json:"LastOrchestratorSeqNum"` // Last seq received from orchestrator | ||
} | ||
|
||
type UpdateInfoResponse struct { | ||
Accepted bool | ||
Reason string | ||
type HeartbeatResponse struct { | ||
LastComputeSeqNum uint64 `json:"LastComputeSeqNum"` // Last seq received from compute node | ||
} | ||
|
||
type UpdateResourcesRequest struct { | ||
NodeID string | ||
AvailableCapacity models.Resources | ||
QueueUsedCapacity models.Resources | ||
// UpdateNodeInfoRequest is used to update the node info | ||
type UpdateNodeInfoRequest struct { | ||
NodeInfo models.NodeInfo `json:"NodeInfo"` | ||
} | ||
type UpdateNodeInfoResponse struct { | ||
Accepted bool `json:"accepted"` | ||
Reason string `json:"reason,omitempty"` | ||
} | ||
|
||
type UpdateResourcesResponse struct{} |
Oops, something went wrong.