catalogue's working set starts empty and a host gives it the seats it read (UseSeats over SeatsFromDefinitions); the node-engine's verbs and events take the seat's name from the caller. Tests take their seats from seatlisttest. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
package catalogue
|
|
|
|
// EnrolmentSeat is the seat mesh-enrolment.
|
|
|
|
// The seat's six verbs (ADR 0587 §1, §4-§8).
|
|
const (
|
|
EnrolmentVerbIssue = "issue"
|
|
EnrolmentVerbRedeem = "redeem"
|
|
EnrolmentVerbConfirm = "confirm"
|
|
EnrolmentVerbRevoke = "revoke"
|
|
EnrolmentVerbTokens = "tokens"
|
|
EnrolmentVerbAgain = "again"
|
|
)
|
|
|
|
// The seat's five events (ADR 0587 §1, §2, §5): said by its holder on the seat, each carrying an enrolment key's whole
|
|
// content except enrolment-expired, which names the node and the enrolment-issued event that carried it.
|
|
const (
|
|
EnrolmentIssuedEvent = "enrolment-issued"
|
|
NodeEnrolledEvent = "node-enrolled"
|
|
EnrolmentRefusedEvent = "enrolment-refused"
|
|
EnrolmentRevokedEvent = "enrolment-revoked"
|
|
EnrolmentExpiredEvent = "enrolment-expired"
|
|
)
|
|
|
|
// EnrolmentEvents are the seat's events, in the order an enrolment says them; the last four each end one.
|
|
var EnrolmentEvents = []string{EnrolmentIssuedEvent, NodeEnrolledEvent, EnrolmentRefusedEvent, EnrolmentRevokedEvent,
|
|
EnrolmentExpiredEvent}
|
|
|
|
// enrolmentDecision is the record that made the seat.
|
|
const enrolmentDecision = "novox/hq ADR 0587"
|