Add agent lease fencing contract

This commit is contained in:
m
2026-08-22 11:59:04 +03:00
parent cb92f95550
commit 9766e5396e
5 changed files with 106 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
package work
import "time"
type AgentLeaseID string
type AgentFencingToken uint64
type AgentLeaseState string
const (
AgentLeaseActive AgentLeaseState = "ACTIVE"
AgentLeaseExpired AgentLeaseState = "EXPIRED"
)
type AgentLease struct {
ID AgentLeaseID
RunID AgentRunID
WorkerID string
FencingToken AgentFencingToken
State AgentLeaseState
AcquiredAt time.Time
ExpiresAt time.Time
}