The node-engine seat's read verb converged (ADR 0683, design 33 control-verbs §10)
The holder of node-packet-filter refuses allow and disallow on an adopted node and never assumes converged, so it asks the node-engine the node's convergence state: adopted or converged, since when, and the found firewall's kind when adopted. The composition answer gains withheld-parts, each part a compose kept because its read did not answer, with why: the filter's node-packet-filter.allowed. Packages generated again by seatgen (seatgen -check clean). Builds: design 33 control-verbs §10; design 08 control-verbs §4; ADR 0683; H-A-316, H-A-321
This commit is contained in:
@@ -33,6 +33,7 @@ const (
|
||||
VerbFirstViewAgain = "first-view-again"
|
||||
VerbEntryAgain = "entry-again"
|
||||
VerbProcessBuilds = "process-builds"
|
||||
VerbConverged = "converged"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -48,7 +49,7 @@ const (
|
||||
|
||||
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
|
||||
func Verbs() []string {
|
||||
return []string{VerbHandOver, VerbAccessAct, VerbJudgeDirectories, VerbSetuidSearch, VerbRootFree, VerbActs, VerbPackages, VerbComposition, VerbCompose, VerbComposeCandidate, VerbManifestReads, VerbApplyOrder, VerbSeatList, VerbSeatListAgain, VerbFirstViews, VerbFirstViewAgain, VerbEntryAgain, VerbProcessBuilds}
|
||||
return []string{VerbHandOver, VerbAccessAct, VerbJudgeDirectories, VerbSetuidSearch, VerbRootFree, VerbActs, VerbPackages, VerbComposition, VerbCompose, VerbComposeCandidate, VerbManifestReads, VerbApplyOrder, VerbSeatList, VerbSeatListAgain, VerbFirstViews, VerbFirstViewAgain, VerbEntryAgain, VerbProcessBuilds, VerbConverged}
|
||||
}
|
||||
|
||||
// Events is every event published on the seat's subject: a new copy each call.
|
||||
@@ -1296,6 +1297,14 @@ type CompositionAnswerWithheldItem struct {
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// CompositionAnswerWithheldPartsItem is a type of the contract.
|
||||
type CompositionAnswerWithheldPartsItem struct {
|
||||
// the read asked, as <seat>.<verb>
|
||||
Part string `json:"part"`
|
||||
// why it did not answer, naming the holder asked
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// CompositionAnswer is what composition answers.
|
||||
type CompositionAnswer struct {
|
||||
// the module's last apply that did not end running; absent when none
|
||||
@@ -1323,6 +1332,8 @@ type CompositionAnswer struct {
|
||||
Want *CompositionAnswerWant `json:"want,omitempty"`
|
||||
// the module's marked subjects the grants part withholds from this node's runtime, each with why, read through mesh-grants' verb withheld (design 46 approval mark 6)
|
||||
Withheld []CompositionAnswerWithheldItem `json:"withheld,omitempty"`
|
||||
// each part a compose kept because its read did not answer, with why (design 08 control-verbs §4, H-A-321): for the packet filter's holder the part node-packet-filter.allowed, its filter file kept as it runs
|
||||
WithheldParts []CompositionAnswerWithheldPartsItem `json:"withheld-parts,omitempty"`
|
||||
// withheld unknown: the grants part does not answer, when its verb withheld did not answer
|
||||
WithheldUnknown string `json:"withheld-unknown,omitempty"`
|
||||
}
|
||||
@@ -1568,6 +1579,26 @@ type ProcessBuildsInput struct {
|
||||
// ProcessBuildsAnswer is what process-builds answers.
|
||||
type ProcessBuildsAnswer = ProcessBuilds
|
||||
|
||||
// ConvergedInput is what converged takes.
|
||||
type ConvergedInput struct {
|
||||
}
|
||||
|
||||
// ConvergedAnswer is what converged answers.
|
||||
type ConvergedAnswer struct {
|
||||
// the kind of the firewall found, for an adopted node
|
||||
Found string `json:"found,omitempty"`
|
||||
// when the node became so, RFC 3339; absent where the engine recorded no time for it
|
||||
Since string `json:"since,omitempty"`
|
||||
// the node's mode: adopted (the found firewall's terms) or converged (the mesh's own filter)
|
||||
State string `json:"state"`
|
||||
}
|
||||
|
||||
// The values of ConvergedAnswer's state.
|
||||
const (
|
||||
ConvergedAnswerStateAdopted = "adopted"
|
||||
ConvergedAnswerStateConverged = "converged"
|
||||
)
|
||||
|
||||
// AskedEvent is the body of the event asked.
|
||||
type AskedEvent = ActSaid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user