File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,21 @@ Common defines resources used across all source types.
44
55## Specification
66
7+ ### Source interface
8+
9+ Source objects should adhere to the ` Source ` interface. This interface exposes the [ interval] ( #source-synchronization )
10+ and [ artifact] ( #source-status ) of the source to clients without the prerequisite of knowing the source kind:
11+
12+ ```` go
13+ type Source interface {
14+ // GetInterval returns the interval at which the source is updated.
15+ GetInterval () metav1.Duration
16+
17+ // GetArtifact returns the latest artifact from the source, or nil.
18+ GetArtifact () *Artifact
19+ }
20+ ````
21+
722### Source synchronization
823
924Source objects should contain a ` spec.interval ` field that tells the controller at which interval to check for updates:
You can’t perform that action at this time.
0 commit comments