Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
990928618d | ||
|
|
9fac8284f5 | ||
|
|
7d9a5edee5 | ||
|
|
32d3f318a5 |
@@ -11,6 +11,7 @@ ARG SOURCE_REVISION=unknown
|
|||||||
LABEL org.opencontainers.image.revision=$SOURCE_REVISION \
|
LABEL org.opencontainers.image.revision=$SOURCE_REVISION \
|
||||||
org.opencontainers.image.source="https://git.cin.su/m/Assistant.git"
|
org.opencontainers.image.source="https://git.cin.su/m/Assistant.git"
|
||||||
RUN addgroup -S assistant && adduser -S -G assistant assistant
|
RUN addgroup -S assistant && adduser -S -G assistant assistant
|
||||||
|
RUN mkdir -p /var/lib/supervisor && chown assistant:assistant /var/lib/supervisor
|
||||||
USER assistant
|
USER assistant
|
||||||
COPY --from=build /out/runtime /usr/local/bin/assistant-runtime
|
COPY --from=build /out/runtime /usr/local/bin/assistant-runtime
|
||||||
ENTRYPOINT ["/usr/local/bin/assistant-runtime"]
|
ENTRYPOINT ["/usr/local/bin/assistant-runtime"]
|
||||||
|
|||||||
@@ -18,24 +18,24 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Release struct {
|
type Release struct {
|
||||||
ID string
|
ID string `json:"id"`
|
||||||
Version string
|
Version string `json:"version"`
|
||||||
State ReleaseState
|
State ReleaseState `json:"state"`
|
||||||
LastKnownGood bool
|
LastKnownGood bool `json:"last_known_good"`
|
||||||
}
|
}
|
||||||
type Observation struct {
|
type Observation struct {
|
||||||
ReleaseID string
|
ReleaseID string `json:"release_id"`
|
||||||
Ready bool
|
Ready bool `json:"ready"`
|
||||||
Reason string
|
Reason string `json:"reason"`
|
||||||
ObservedAtUnixMillis int64
|
ObservedAtUnixMillis int64 `json:"observed_at_unix_millis"`
|
||||||
}
|
}
|
||||||
type Lifeboat struct {
|
type Lifeboat struct {
|
||||||
Current Release
|
Current Release `json:"current"`
|
||||||
LastKnownGood Release
|
LastKnownGood Release `json:"last_known_good"`
|
||||||
Observations []Observation
|
Observations []Observation `json:"observations"`
|
||||||
TrafficMode TrafficMode
|
TrafficMode TrafficMode `json:"traffic_mode"`
|
||||||
StableUpstream string
|
StableUpstream string `json:"stable_upstream"`
|
||||||
CandidateUpstream string
|
CandidateUpstream string `json:"candidate_upstream"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *Lifeboat) Start(candidate Release) bool {
|
func (l *Lifeboat) Start(candidate Release) bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user