The state performed filled to 77% of its template's 64 MiB (19,530 keys, 2.6 KB each): the bridge kept every owed event whole beside its outcome. performed's value is now the outcome said as owed.ended, with when, and the repository and number the act names (groups.Performed); bridge_owed_again reads the act from the gate's stream owed on its pull request's subject through an ordered consumer, the stream being the act's one copy; bridge_owed reads one act or one pull request's acts, never the whole state, whose answer had grown past what the bus carries. Builds: design 47 G §163, §162, §168; H-A-181, H-A-182
27 lines
1.3 KiB
Go
27 lines
1.3 KiB
Go
package groups
|
|
|
|
import (
|
|
"encoding/base64"
|
|
|
|
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg"
|
|
)
|
|
|
|
// The state performed keeps one key per owed act the bridge performed, its outcome and when, and the pull request the
|
|
// act names, nothing more (novox/hq design 47 G §163, H-A-181, H-A-182): the act itself stays in the stream owed of the
|
|
// seat that said it, its one copy, where bridge_owed_again reads it again. The bridge writes it; its tools read it.
|
|
|
|
// PerformedKey is the key of one act in performed: the seat that said it and its id, the id in unpadded base64url, since
|
|
// an id may hold what a key may not (`#`, `/`).
|
|
func PerformedKey(of, id string) string {
|
|
return of + "." + base64.RawURLEncoding.EncodeToString([]byte(id))
|
|
}
|
|
|
|
// Performed is one value of the state performed (§163, H-A-182): the outcome said as owed.ended, with when, and the
|
|
// repository and number of the pull request the act names, so bridge_owed reads one pull request's acts and
|
|
// bridge_owed_again finds the act on its pull request's subject of the stream owed (H-A-181).
|
|
type Performed struct {
|
|
Ended forgemsg.OwedEnded `json:"ended"`
|
|
Repository string `json:"repository,omitempty"`
|
|
Number int `json:"number,omitempty"`
|
|
}
|