oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package equipo
2
3import (
4 "slices"
5 "time"
6
7 "amadan.net/oficina/equipo/internal/equipo/planning"
8 "amadan.net/oficina/equipo/internal/equipo/team"
9 "amadan.net/oficina/equipo/internal/runnerproto"
10)
11
12// ConnectionRouting is an assertion by the authenticated runner about its
13// operator-managed binding file and supported provider routing. It contains
14// opaque account identity and a home hash, never credentials or home paths.
15type ConnectionRouting = runnerproto.ConnectionRouting
16
17type ConnectionReport = runnerproto.ConnectionReport
18
19type Connection = planning.Connection
20type connectionRecord = planning.ConnectionRecord
21type ConnectionChoice = planning.ConnectionChoice
22type connectionChoiceRecord = planning.ConnectionChoiceRecord
23
24type IsolationAcknowledgement struct {
25 ID string `gorm:"primaryKey"`
26 ConnectionID string `gorm:"index:connection_ack"`
27 Owner, Provider, ProviderVersion, PaseoVersion, IsolationConfigHash string
28 AcknowledgedAt time.Time
29 ConnectionRevision int64
30}
31type isolationAcknowledgementRecord struct {
32 IsolationAcknowledgement `gorm:"embedded"`
33 OwnerRevision int64
34 RevokedAt *time.Time
35}
36
37func (isolationAcknowledgementRecord) TableName() string { return "isolation_acknowledgements" }
38
39// ConnectionInvalidation is a durable request for the assignment service to
40// fence pending work and contain affected attempts before reuse. Selection is
41// not a dispatch reservation; Task 8 must recheck inside admission.
42type ConnectionInvalidation struct {
43 ID int64
44 ConnectionID string `gorm:"index:connection_invalidation"`
45 Revision int64
46 Reason string
47 At time.Time
48}
49
50type Selection = runnerproto.Selection
51
52// WithVerifiedIsolationTuples captures a copy at construction. Reports cannot
53// extend this release-owned list. The production default is empty.
54func WithVerifiedIsolationTuples(tuples []team.IsolationTuple) StoreOption {
55 captured := slices.Clone(tuples)
56 return func(s *Store) { s.verifiedIsolation = slices.Clone(captured) }
57}
58