Documentation
¶
Overview ¶
Package archsketch is a release's architecture snapshot (ADR-0471): what a process application offers to its environment and what it depends on, taken by value when the release is recorded, and the renderings a reader takes away from it — a deterministic SVG and an ArchiMate Open Exchange document.
The package holds no state and reads nothing. The server assembles a Snapshot from the compiled processes a release shipped, on its run loop, and stores it on the release record in the same write that records the release; the renderers turn a stored snapshot into bytes and never consult anything else. That is what makes a rendering of v7 the same picture tomorrow as today: nothing it is drawn from can change after the release was recorded.
A snapshot holds the release's **logical part** — the part fixed by its content, identical on every installation that records it — and, from format version 2, the recording installation's **physical part**: which worker serves each name there, at which endpoint, and who opens which connection (ADR-0471 §1; see physical.go). A snapshot from before that has no physical part, and its renderings say so rather than drawing a guess.
Index ¶
- Constants
- Variables
- func ArchiMate(s Snapshot, m Meta) []byte
- func SVG(s Snapshot, m Meta) []byte
- type Business
- type BusinessOmitted
- type BusinessProcess
- type BusinessRole
- type Capability
- type Coupling
- type CouplingOmitted
- type Data
- type DataClass
- type DataObject
- type DataOmitted
- type DataStore
- type DataWrite
- type Dependency
- type Endpoint
- type EntryPoint
- type EventFeed
- type FeedTarget
- type InboundSite
- type JobTypeSite
- type KPI
- type Layer
- type Meta
- type NameUse
- type Observers
- type Owner
- type Peer
- type PersonalDeclaration
- type PersonalRecipient
- type Physical
- type Process
- type Product
- type ProductAction
- type ProductBinding
- type ProductOutcome
- type Realization
- type SLA
- type Selection
- type Snapshot
- func (s Snapshot) LocalDecisions() int
- func (s Snapshot) Minimal(applicationID string) Snapshot
- func (s *Snapshot) Normalize()
- func (s Snapshot) NotShown() []string
- func (s Snapshot) Outbound() []Dependency
- func (s Snapshot) Recorded() Selection
- func (s Snapshot) Select(sel Selection) Snapshot
- func (s Snapshot) Shown() Selection
- func (s Snapshot) UnreadProcesses() int
- type Stage
- type StartLinks
- type Strategy
- type StrategyOmitted
- type Use
- type ValueStream
- type WorkerIdentity
- type WorkerSite
Constants ¶
const ( // RoleCandidateGroup is a candidate group a user task names as a literal. RoleCandidateGroup = "candidateGroup" // RoleLane is a lane of a process. RoleLane = "lane" )
Role kinds.
const ( NameMessage = "message" NameSignal = "signal" )
Name kinds.
const ( // DirectionIn is a name the release receives: a peer throws it. DirectionIn = "in" // DirectionOut is a name the release throws: a peer receives it. DirectionOut = "out" )
Directions, from the release's side.
const ( // PlacementEngine: the Atlas server runs the Worker Type itself and connects to the // target directly. Deprecated for side-effecting work (ADR-0164), and still how // some installations run. PlacementEngine = "engine" // PlacementWorker: a worker process leases the work from Atlas's API and connects // to the target — two connections, opened from the worker's side both times. PlacementWorker = "worker" )
Placements: who opens the connection to a worker's target system.
const ( // DependencyWorker is a worker named in the model: work the engine hands to // whatever serves that name. DependencyWorker = "worker" // DependencyRuntimeWorker is a worker name authored as a FEEL expression. Which // worker it reaches is decided per instance, so the snapshot holds the expression // and nothing it could resolve to. DependencyRuntimeWorker = "runtimeWorker" // DependencyJobType is a service or send task's job type: work any worker that // subscribes to the type leases from Atlas's API (ADR-0007). The model names the // work, not who does it. DependencyJobType = "jobType" // DependencyCall is a call activity into a process this release did not ship. DependencyCall = "call" // DependencyDecision is a local DMN decision a business rule task evaluates. It // runs inside the engine and crosses no boundary, so it is recorded for // completeness and drawn inside the application rather than beside it. DependencyDecision = "decision" )
Dependency kinds.
const ( RealizedByProcess = "process" RealizedByWorker = "worker" )
Realization kinds, as the register spells them.
const ( // EntryMessage is a message name the application receives: published to the // server under that name, it reaches the elements that wait for it. EntryMessage = "message" )
Entry point kinds.
const FormatVersion = 7
FormatVersion versions the shape of a stored Snapshot. It is written into every snapshot, so a reader can tell which fields a snapshot from an older build can be expected to carry. A snapshot is never rewritten when this changes.
Version 2 added the physical part and job-type dependencies; version 3 the endpoints worker instances report for the names they serve; version 4 the rest of a configured Worker and the inbound subscriptions (ADR-0495 slice B); version 5 the data layer (slice C); version 6 the business and strategy layers (slice D); version 7 the cross-application coupling and the event feed (slice E), and whether a called application is withheld from a reader.
const MappingVersion = 7
MappingVersion versions how a snapshot is drawn and written as ArchiMate: which facts become which elements and relationships. It is a small public contract — a document generated under one version stays what it was — and every rendering states it. Version 2 draws the physical part: connections from the side that opens them, target systems, and job types. Version 3 draws a reported endpoint as reported. Version 4 draws what else a Worker's configuration says, its mailbox and scanner as further target systems, and the inbound subscriptions that feed a message. Version 5 draws the data layer: a band of data objects, stores, classes and personal-data declarations, and in ArchiMate each process as an Application Process accessing its data objects, which realise the Business Objects of their classes. Version 6 draws the business and strategy layers as bands above the picture, and in ArchiMate each process as a Business Process its Application Process realises, the roles assigned to it, the products it carries out, and the capabilities and value streams it serves. Version 7 draws the coupling: the messages and signals the release throws and catches, who in other applications is at the other end, and the event feed; in ArchiMate each peer process is an Application Process of its application, triggering or triggered by the release's processes.
A snapshot keeps the version it was taken under, and a snapshot without a physical part is drawn exactly as version 1 drew it, so the version a rendering states is the snapshot's own.
Variables ¶
var DefaultSelection = SelectionOf(LayerApplication, LayerTechnology)
DefaultSelection is what a read that names no layers shows: the two layers every sketch was drawn with before layers existed, so a reader or an embedded picture that chose nothing sees exactly what it saw before.
Functions ¶
func ArchiMate ¶
ArchiMate renders the snapshot as an ArchiMate Model Exchange document. A value Snapshot.Select narrowed to the technology layer is written as the installation alone.
A value whose selection holds the data layer also carries the data layer's elements, joined to the application component when the application layer is shown.
func SVG ¶
SVG renders the snapshot as a standalone SVG document. A value Snapshot.Select narrowed to the technology layer is drawn as the installation alone.
A value whose selection holds the data layer gets a band below the picture (ADR-0495 §3); a value whose selection holds only the data layer is drawn as that band alone.
Types ¶
type Business ¶ added in v0.21.0
type Business struct {
Processes []BusinessProcess `json:"processes"`
Roles []BusinessRole `json:"roles"`
Products []Product `json:"products"`
// ProductsWithheld counts the products a read withheld from its reader; it is set
// by [Business.Redacted], never stored.
ProductsWithheld int `json:"productsWithheld,omitempty"`
// Omitted counts, per kind, what the bounds left out.
Omitted BusinessOmitted `json:"omitted,omitzero"`
}
Business is the business layer, absent on a snapshot taken before format version 6.
type BusinessOmitted ¶ added in v0.21.0
type BusinessOmitted struct {
Roles int `json:"roles,omitempty"`
RoleUses int `json:"roleUses,omitempty"`
Products int `json:"products,omitempty"`
ProductActions int `json:"productActions,omitempty"`
}
BusinessOmitted counts what the bounds left out of each list.
type BusinessProcess ¶ added in v0.21.0
type BusinessProcess struct {
ProcessID string `json:"processId"`
Name string `json:"name,omitempty"`
// GroupTasks are the user tasks offered to candidate groups the model names,
// PersonTasks those assigned to one person by name, RuntimeTasks those whose
// assignee or candidate groups the model computes per instance, and OpenTasks
// those that name nobody.
GroupTasks int `json:"groupTasks,omitempty"`
PersonTasks int `json:"personTasks,omitempty"`
RuntimeTasks int `json:"runtimeTasks,omitempty"`
OpenTasks int `json:"openTasks,omitempty"`
}
BusinessProcess is one release process as the work it does, with how its user tasks say who does them.
type BusinessRole ¶ added in v0.21.0
type BusinessRole struct {
Name string `json:"name"`
Kind string `json:"kind"`
// UsedBy are the user tasks offered to a candidate group, or for a lane the
// processes that have it.
UsedBy []Use `json:"usedBy"`
}
BusinessRole is one human role the release's processes name: a candidate group, as the model writes it, or a lane.
type Capability ¶ added in v0.21.0
type Capability struct {
Key string `json:"key"`
Name string `json:"name"`
State string `json:"state,omitempty"`
// ConfirmedAt is when the record was last confirmed, in Unix seconds; zero when it
// never was.
ConfirmedAt int64 `json:"confirmedAt,omitempty"`
Owner *Owner `json:"owner,omitempty"`
KPIs []KPI `json:"kpis,omitempty"`
SLAs []SLA `json:"slas,omitempty"`
RealizedBy []Realization `json:"realizedBy"`
}
Capability is one capability the release realises.
type Coupling ¶ added in v0.21.0
type Coupling struct {
// Names are the messages and signals the release throws, and the signals it
// catches; the messages it receives are its entry points.
Names []NameUse `json:"names"`
// Peers are the processes of other applications that throw a name the release
// receives, or receive a name it throws.
Peers []Peer `json:"peers"`
// Feed is the event feed the installation pushes.
Feed EventFeed `json:"feed"`
// PeersWithheld counts the peers a read withheld from its reader; it is set by
// [Coupling.Redacted], never stored.
PeersWithheld int `json:"peersWithheld,omitempty"`
// Omitted counts, per kind, what the bounds left out.
Omitted CouplingOmitted `json:"omitted,omitzero"`
}
Coupling is the release's cross-application coupling, absent on a snapshot taken before format version 7.
func (Coupling) Redacted ¶ added in v0.21.0
func (c Coupling) Redacted(mayViewPeer func(Peer) bool, mayViewWorker func(id string) bool) Coupling
Redacted is the coupling as one reader sees it: a peer mayViewPeer refuses keeps its name and direction and loses its application and process, and is counted; a feed target whose Worker mayViewWorker refuses loses its name and endpoint. The coupling it is called on is not changed.
type CouplingOmitted ¶ added in v0.21.0
type CouplingOmitted struct {
Names int `json:"names,omitempty"`
Peers int `json:"peers,omitempty"`
FeedTargets int `json:"feedTargets,omitempty"`
}
CouplingOmitted counts what the bounds left out of each list.
type Data ¶ added in v0.21.0
type Data struct {
Objects []DataObject `json:"objects"`
Stores []DataStore `json:"stores"`
Classes []DataClass `json:"classes"`
Personal []PersonalDeclaration `json:"personal"`
// Omitted counts, per kind, what the bounds left out.
Omitted DataOmitted `json:"omitted,omitzero"`
}
Data is the data layer, absent on a snapshot taken before format version 5. A snapshot that has one recorded the layer even when every list is empty: the release was read and declares no data.
type DataClass ¶ added in v0.21.0
type DataClass struct {
Name string `json:"name"`
// Modeled is set when the application's information model defines the class; a
// class that is not modeled is only a name the process model declares.
Modeled bool `json:"modeled,omitempty"`
}
DataClass is one class the release keeps data as: a type its data objects declare, or a class its stores hold.
type DataObject ¶ added in v0.21.0
type DataObject struct {
ProcessID string `json:"processId"`
Name string `json:"name"`
// Class is the type the model declares for it (the itemDefinition's structure),
// empty when it declares none.
Class string `json:"class,omitempty"`
Collection bool `json:"collection,omitempty"`
InitialState string `json:"initialState,omitempty"`
// ReadBy are the elements whose data input associations read it.
ReadBy []string `json:"readBy"`
// WrittenBy are the elements whose data output associations write it.
WrittenBy []DataWrite `json:"writtenBy"`
}
DataObject is one BPMN data object a process declares (ADR-0053): its type, the state it starts in, and which activities read it and write it.
type DataOmitted ¶ added in v0.21.0
type DataOmitted struct {
Objects int `json:"objects,omitempty"`
Stores int `json:"stores,omitempty"`
Classes int `json:"classes,omitempty"`
PersonalVariables int `json:"personalVariables,omitempty"`
}
DataOmitted counts what the bounds left out of each list.
type DataStore ¶ added in v0.21.0
type DataStore struct {
Name string `json:"name"`
// Class is the class the application's information model keeps in the store,
// empty when no model names one.
Class string `json:"class,omitempty"`
UsedBy []Use `json:"usedBy"`
}
DataStore is one named data store the release's processes refer to: a place instances of a class outlive the process that made them. The compiled model keeps where a store is named, not which activity reads or writes it.
type DataWrite ¶ added in v0.21.0
type DataWrite struct {
ElementID string `json:"elementId"`
State string `json:"state,omitempty"`
Members []string `json:"members,omitempty"`
}
DataWrite is one element writing a data object: the state it moves the object into, and the members it writes when it writes members rather than the whole value.
type Dependency ¶
type Dependency struct {
Kind string `json:"kind"`
// Name is the worker name, the FEEL expression of a runtime worker, the job type,
// the called process id, or the decision id.
Name string `json:"name"`
// WorkerType is a worker's Worker Type ("rest", "mail", …) as the model's task
// type states it.
WorkerType string `json:"workerType,omitempty"`
// TargetApplicationID and TargetApplication name the application that held the
// called process on the recording installation when the snapshot was taken. Empty
// when nothing there held it — which says the call had no target there, not that
// it has none anywhere.
TargetApplicationID string `json:"targetApplicationId,omitempty"`
TargetApplication string `json:"targetApplication,omitempty"`
// TargetWithheld is set by a read for a reader who may not see the called
// application: the call stays, the application's name does not (ADR-0495 §5).
TargetWithheld bool `json:"targetWithheld,omitempty"`
UsedBy []Use `json:"usedBy"`
}
Dependency is one way out.
type Endpoint ¶
type Endpoint struct {
Scheme string `json:"scheme,omitempty"`
Host string `json:"host,omitempty"`
// Port is the port the configured value named. Empty when it named none, which
// means the scheme's or the Worker Type's default — the snapshot does not guess
// which.
Port string `json:"port,omitempty"`
// Unparseable is set when the configured value could not be read as an address.
// The value itself is not kept: what cannot be parsed cannot be cleaned either.
Unparseable bool `json:"unparseable,omitempty"`
// Withheld is set on a read for a reader who may not see it. Never stored.
Withheld bool `json:"withheld,omitempty"`
}
Endpoint is one address, reduced to the three parts a reader of an architecture sketch needs.
func ParseEndpoint ¶
ParseEndpoint reduces a configured endpoint to scheme, host and port (internal/endpoint), and returns nil for an empty value. A value that cannot be an address is recorded as unparseable and not kept.
type EntryPoint ¶
type EntryPoint struct {
Kind string `json:"kind"`
Name string `json:"name"`
// Starts is set when at least one element receiving this message starts an
// instance; otherwise every receipt continues one that is already running.
Starts bool `json:"starts,omitempty"`
UsedBy []Use `json:"usedBy"`
}
EntryPoint is one way in.
type EventFeed ¶ added in v0.21.0
type EventFeed struct {
Subscriptions int `json:"subscriptions"`
Targets []FeedTarget `json:"targets"`
}
EventFeed is the event feed the installation pushes (ADR-0433): how many subscriptions are enabled and the endpoints they push to. The feed carries every application's events, narrowed only by catalogue reach, so a release's incidents go to it, and its products' action outcomes when it carries out products.
type FeedTarget ¶ added in v0.21.0
type FeedTarget struct {
Worker string `json:"worker,omitempty"`
ConfiguredID string `json:"configuredId,omitempty"`
Endpoint *Endpoint `json:"endpoint,omitempty"`
// Withheld is set by a read for a reader who may not see the Worker.
Withheld bool `json:"withheld,omitempty"`
}
FeedTarget is one endpoint the feed is pushed to, through a cloudevents Worker.
type InboundSite ¶ added in v0.21.0
type InboundSite struct {
MessageName string `json:"messageName"`
// Worker and WorkerType name the configured Worker the subscription reads
// through; empty when the Worker had been deleted since, which leaves the
// subscription with nowhere to read from.
Worker string `json:"worker,omitempty"`
WorkerType string `json:"workerType,omitempty"`
// ConfiguredID is that Worker's id, kept so a read can ask who may see the
// subscription's subject and endpoint: both are the Worker's configuration.
ConfiguredID string `json:"configuredId,omitempty"`
// Subject is what the subscription watches, in the terms of the Worker's kind: a
// clio subject (Recursive when it takes the subtree too), a Jira query, a
// spreadsheet, a folder, a channel or a mail folder.
Subject string `json:"subject,omitempty"`
Recursive bool `json:"recursive,omitempty"`
Endpoint *Endpoint `json:"endpoint,omitempty"`
// Withheld is set on a read by somebody who may not see the Worker's
// configuration: the subscription is still there, its subject and endpoint are not.
Withheld bool `json:"withheld,omitempty"`
}
InboundSite is one inbound subscription (ADR-0205): a configured Worker watches a subject on the system it reaches and republishes each new event there as a message this release receives. Atlas opens that connection itself.
type JobTypeSite ¶
JobTypeSite is what the installation had seen serve one job type.
type KPI ¶ added in v0.21.0
type KPI struct {
Name string `json:"name"`
Metric string `json:"metric,omitempty"`
Goal string `json:"goal,omitempty"`
Direction string `json:"direction,omitempty"`
}
KPI is a measure a capability declares, as declared.
type Meta ¶
Meta is what a rendering says about the release it was drawn from. It comes from the release record and the application, not from the snapshot, because the snapshot is the release's content and these are its names.
type NameUse ¶ added in v0.21.0
type NameUse struct {
Kind string `json:"kind"`
Name string `json:"name"`
Direction string `json:"direction"`
UsedBy []Use `json:"usedBy"`
}
NameUse is one message or signal name the release throws or catches, with the elements that do.
type Observers ¶
type Observers struct {
ObservedBy []string `json:"observedBy,omitempty"`
Observed int `json:"observed"`
ObserversWithheld bool `json:"observersWithheld,omitempty"`
}
Observers are the worker instances that reported serving something since the installation started. Observed is their number, kept beside the ids so a read that withholds the ids still says how many there were.
type Owner ¶ added in v0.21.0
type Owner struct {
Name string `json:"name,omitempty"`
Role string `json:"role,omitempty"`
// Withheld is set by a read for a reader outside Atlas (see [Snapshot.Minimal]):
// an owner is recorded, and the person is not what such a reader is shown.
Withheld bool `json:"withheld,omitempty"`
}
Owner is who answers for a capability or a value stream, by name and role only.
type Peer ¶ added in v0.21.0
type Peer struct {
Kind string `json:"kind"`
Name string `json:"name"`
Direction string `json:"direction"`
// ApplicationID and Application name the peer's application; both are empty for a
// process filed in no application.
ApplicationID string `json:"applicationId,omitempty"`
Application string `json:"application,omitempty"`
ProcessID string `json:"processId,omitempty"`
ElementID string `json:"elementId,omitempty"`
// System is set for one of Atlas's own processes (ADR-0435).
System bool `json:"system,omitempty"`
// Withheld is set by a read for a reader who may not see the peer's application:
// the name and direction stay, the application and process do not.
Withheld bool `json:"withheld,omitempty"`
}
Peer is one element of another application's process that throws a name the release receives, or receives one it throws.
type PersonalDeclaration ¶ added in v0.21.0
type PersonalDeclaration struct {
ProcessID string `json:"processId"`
Variables []string `json:"variables"`
Subject string `json:"subject"`
// HandedTo are the workers, runtime workers and job types the process hands work
// to. Each can read every variable visible at its task in plaintext — a worker
// process leasing a job is given them all deciphered, and a Worker Atlas runs
// resolves its task over them — so each can receive these values, whether or not
// its task names one.
HandedTo []PersonalRecipient `json:"handedTo"`
}
PersonalDeclaration is what one process declares about personal data (ADR-0314): which of its variables hold it, the variable naming whose data it is, and who the process hands work to.
type PersonalRecipient ¶ added in v0.21.0
type PersonalRecipient struct {
Kind string `json:"kind"`
Name string `json:"name"`
WorkerType string `json:"workerType,omitempty"`
}
PersonalRecipient is one worker or job type a process hands work to, as its dependency is recorded.
type Physical ¶
type Physical struct {
// Node and Environment are the recording installation's operator-given name and
// environment (ADR-0189 §6). Empty where nobody named them.
Node string `json:"node,omitempty"`
Environment string `json:"environment,omitempty"`
// ExternalURL is the origin the installation was configured to be reached under.
// Nil when none was configured: the listen address is not the reachable address,
// so it is not offered in its place.
ExternalURL *Endpoint `json:"externalUrl,omitempty"`
// PublicStartLinks counts the public start links each process had here. The links
// themselves are their own authorization and are never recorded.
PublicStartLinks []StartLinks `json:"publicStartLinks"`
Workers []WorkerSite `json:"workers"`
JobTypes []JobTypeSite `json:"jobTypes"`
// Inbound are the inbound subscriptions that turned an external system's events
// into a message the release receives (format version 4, ADR-0495 slice B). A
// disabled subscription feeds nothing and is not recorded.
Inbound []InboundSite `json:"inbound,omitempty"`
}
Physical is the installation's half of a snapshot.
func (Physical) Redacted ¶
func (p Physical) Redacted(mayViewWorker func(configuredID string) bool, mayViewInstances bool) Physical
Redacted is the physical part as one reader may see it. mayViewWorker answers for a configured worker's endpoint by the worker's id; mayViewInstances answers for the worker instances, which are what the Workers view shows. The receiver is not changed.
type Process ¶
type Process struct {
ProcessID string `json:"processId"`
Name string `json:"name,omitempty"`
Version int32 `json:"version"`
// Unread is set when the definition was recorded as a member but its compiled
// form was not there to read. Its entry points and dependencies are then missing
// from the snapshot, and the snapshot says so rather than drawing a process that
// offers and needs nothing.
Unread bool `json:"unread,omitempty"`
}
Process is one process the release shipped.
type Product ¶ added in v0.21.0
type Product struct {
ID string `json:"id"`
Name string `json:"name"`
CatalogID string `json:"catalogId"`
CatalogName string `json:"catalogName,omitempty"`
State string `json:"state,omitempty"`
// Bindings are the operations a release process carries out for it.
Bindings []ProductBinding `json:"bindings"`
// Actions are the commands a lifecycle product declares, with what each publishes.
Actions []ProductAction `json:"actions,omitempty"`
}
Product is one catalogue product a release process carries out (ADR-0396, ADR-0425, ADR-0429), as its catalogue last published it.
type ProductAction ¶ added in v0.21.0
type ProductAction struct {
Key string `json:"key"`
Message string `json:"message"`
Effect string `json:"effect,omitempty"`
Triggers []string `json:"triggers,omitempty"`
Outcomes []ProductOutcome `json:"outcomes,omitempty"`
}
ProductAction is one command a lifecycle product declares (ADR-0429).
type ProductBinding ¶ added in v0.21.0
type ProductBinding struct {
Op string `json:"op"`
ProcessID string `json:"processId"`
Message string `json:"message,omitempty"`
}
ProductBinding is one operation of a product and the release process that carries it out; Message is set when a lifecycle process receives the operation as a message.
type ProductOutcome ¶ added in v0.21.0
ProductOutcome is the event type an action publishes for one outcome.
type Realization ¶ added in v0.21.0
type Realization struct {
Kind string `json:"kind"`
ProcessID string `json:"processId,omitempty"`
Worker string `json:"worker,omitempty"`
}
Realization is what of the release realises a capability: one of its processes, or a Worker it names.
type SLA ¶ added in v0.21.0
type SLA struct {
Name string `json:"name"`
Metric string `json:"metric,omitempty"`
Threshold string `json:"threshold,omitempty"`
Window string `json:"window,omitempty"`
Scope string `json:"scope,omitempty"`
}
SLA is a service level a capability declares, as declared.
type Selection ¶ added in v0.21.0
type Selection uint8
Selection is a set of layers.
func ParseSelection ¶ added in v0.21.0
ParseSelection reads a layers= value: layer names separated by commas, in any order and any case. An empty value is the default selection. A name that is not a layer is an error naming it, because a link that quietly drops a layer it asked for draws a picture its author did not mean.
func SelectionOf ¶ added in v0.21.0
SelectionOf is the set of the layers named.
type Snapshot ¶
type Snapshot struct {
FormatVersion int `json:"formatVersion"`
MappingVersion int `json:"mappingVersion"`
// TakenAt is when the snapshot was taken, by the server's clock, in Unix seconds.
TakenAt int64 `json:"takenAt"`
// Processes are the release's process members, as they were deployed.
Processes []Process `json:"processes"`
// EntryPoints are where the environment reaches into the application.
EntryPoints []EntryPoint `json:"entryPoints"`
// Dependencies are what the application reaches out to.
Dependencies []Dependency `json:"dependencies"`
// Physical is the recording installation's half, absent on a snapshot taken
// before format version 2.
Physical *Physical `json:"physical,omitempty"`
// Data is the data layer, absent on a snapshot taken before format version 5.
Data *Data `json:"data,omitempty"`
// Business and Strategy are the business and strategy layers, absent on a
// snapshot taken before format version 6.
Business *Business `json:"business,omitempty"`
Strategy *Strategy `json:"strategy,omitempty"`
// Coupling is how the release meets other applications through names, and the
// event feed; part of the application layer, absent before format version 7.
Coupling *Coupling `json:"coupling,omitempty"`
// contains filtered or unexported fields
}
Snapshot is the logical part of one release's architecture.
func (Snapshot) LocalDecisions ¶
LocalDecisions counts the distinct local decisions the application evaluates.
func (Snapshot) Minimal ¶ added in v0.21.0
Minimal is the snapshot as a reader outside Atlas may see it: a page in another system that shows the sketch to everybody who can open that page (ADR-0493, as amended for the architecture sketch). Everything a read withholds from some reader of the release (ADR-0495 §5) is withheld here from every reader:
- a Worker keeps its name and Worker Type and loses its endpoints, the rest of its configuration and its inbound subscriptions' subjects, and the instances seen serving it are counted rather than named;
- a catalogue product is counted rather than shown;
- another application, called or coupled through a name, is "another application", and a feed endpoint is withheld;
- the owner of a capability or a value stream is withheld, name and role, because a person is not what such a page shows.
The release's own application keeps its name: it is what the page names. The snapshot it is called on is not changed, and the result is what every reader gets, so it depends on nothing but the snapshot.
func (*Snapshot) Normalize ¶
func (s *Snapshot) Normalize()
Normalize puts every list in a fixed order and merges duplicates, so the same release produces the same snapshot — and the same rendering bytes — whatever order its members were read in.
func (Snapshot) NotShown ¶
NotShown is what a rendering of this snapshot lists as absent, in this order. A sketch is believed for everything it does not contradict, so the gaps travel inside it.
func (Snapshot) Outbound ¶
func (s Snapshot) Outbound() []Dependency
Outbound is the dependencies that cross the server's boundary — everything but the local decisions, which the engine evaluates itself.
func (Snapshot) Recorded ¶ added in v0.21.0
Recorded is the layers this snapshot holds something for: the application layer always, the technology layer when the snapshot carries a physical part, the data layer when it carries a data part — even an empty one, which says the release declares no data. On a value Snapshot.Select returned it is still the stored snapshot's answer, so a picture can say which recorded layers were switched off.
func (Snapshot) Select ¶ added in v0.21.0
Select is the snapshot as a read of these layers sees it. Without the technology layer it has no physical part and is drawn as a logical view; without the application layer it keeps its processes, so a reader still learns what the release shipped, but none of its ways in or dependencies, and none of the public start links. Without the data layer it has no data part. The snapshot it is called on is not changed.
func (Snapshot) UnreadProcesses ¶
UnreadProcesses counts the members whose compiled form was not there to read.
type Stage ¶ added in v0.21.0
type Stage struct {
Key string `json:"key"`
Name string `json:"name"`
Capabilities []string `json:"capabilities"`
}
Stage is one stage of a value stream, with the capabilities of the release it uses; its order is the stream's own.
type StartLinks ¶
StartLinks is how many public start links one process had.
type Strategy ¶ added in v0.21.0
type Strategy struct {
Capabilities []Capability `json:"capabilities"`
ValueStreams []ValueStream `json:"valueStreams"`
// Omitted counts, per kind, what the bounds left out.
Omitted StrategyOmitted `json:"omitted,omitzero"`
}
Strategy is the strategy layer, absent on a snapshot taken before format version 6.
type StrategyOmitted ¶ added in v0.21.0
type StrategyOmitted struct {
Capabilities int `json:"capabilities,omitempty"`
ValueStreams int `json:"valueStreams,omitempty"`
Measures int `json:"measures,omitempty"`
Stages int `json:"stages,omitempty"`
}
StrategyOmitted counts what the bounds left out of each list.
type Use ¶
type Use struct {
ProcessID string `json:"processId"`
ElementID string `json:"elementId,omitempty"`
}
Use is one element that states an entry point or a dependency: what a line on the sketch can be traced back to.
type ValueStream ¶ added in v0.21.0
type ValueStream struct {
Key string `json:"key"`
Name string `json:"name"`
Owner *Owner `json:"owner,omitempty"`
Stages []Stage `json:"stages"`
}
ValueStream is one value stream a stage of which uses a capability the release realises, with all its stages, so the place of those capabilities in it shows.
type WorkerIdentity ¶ added in v0.21.0
type WorkerIdentity struct {
Mode string `json:"mode"`
Enforcement string `json:"enforcement,omitempty"`
}
WorkerIdentity is which identity a Worker's actions run as (ADR-0475): the service's own, a fixed delegated connection, or the person who started each instance; and whether the policy decision beside it is enforced or only recorded.
type WorkerSite ¶
type WorkerSite struct {
Name string `json:"name"`
WorkerType string `json:"workerType,omitempty"`
Placement string `json:"placement"`
// ConfiguredID is the configured worker the installation held under this name, and
// empty when it held none — the case of a worker that keeps its own configuration
// (ADR-0168). Kept so a read can ask who may see its endpoint.
ConfiguredID string `json:"configuredId,omitempty"`
Endpoint *Endpoint `json:"endpoint,omitempty"`
MailboxEndpoint *Endpoint `json:"mailboxEndpoint,omitempty"`
// EndpointReported is set when Endpoint is not the installation's configuration
// but what the worker instances serving the name reported (format version 3).
// It is then information about those instances, and a read treats it as such.
EndpointReported bool `json:"endpointReported,omitempty"`
// EndpointsDiffer is set when the instances serving the name reported different
// endpoints. None of them is recorded then: picking one would draw a single
// system where the installation reaches several.
EndpointsDiffer bool `json:"endpointsDiffer,omitempty"`
// The rest of the configured Worker, from format version 4 (ADR-0495 slice B),
// none of it a secret: the mail transport, the malware scanner a mail Worker hands
// messages to, the model an agent Worker asks (ADR-0255), the identity its actions
// run as, and whether a credential is configured — never which one.
Provider string `json:"provider,omitempty"`
ScannerEndpoint *Endpoint `json:"scannerEndpoint,omitempty"`
Model string `json:"model,omitempty"`
Identity *WorkerIdentity `json:"identity,omitempty"`
Credential bool `json:"credential,omitempty"`
// DetailWithheld is set on a read by somebody who may not see the Worker's
// configuration and the snapshot held some of it.
DetailWithheld bool `json:"detailWithheld,omitempty"`
Observers
}
WorkerSite is what the installation had in place for one worker name.