Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecentRouter ¶
type RecentRouter struct { *httprouter.Router // contains filtered or unexported fields }
RecentRouter is an HTTP API for accessing recent synchronisations.
func NewRouter ¶
func NewRouter(r *RecentSynchronisations) *RecentRouter
NewRouter creates and returns a new RecentRouter.
func (*RecentRouter) GetLatest ¶
func (a *RecentRouter) GetLatest(w http.ResponseWriter, r *http.Request)
GetLatest returns the most recent synchronisation log.
type RecentSynchronisations ¶
type RecentSynchronisations struct {
// contains filtered or unexported fields
}
RecentSynchronisations represents a ring buffer of recent sync states.
func NewRecentSynchronisations ¶
func NewRecentSynchronisations(r *ring.Ring) *RecentSynchronisations
NewRecentSynchronisations creates and returns a ring buffer of synchronisations.
func (*RecentSynchronisations) Add ¶
func (r *RecentSynchronisations) Add(start, end time.Time, sha plumbing.Hash, syncErr error, results []common.ResourceSyncResult)
Add records the details of a synchronisation in the ring.
func (*RecentSynchronisations) Latest ¶
func (r *RecentSynchronisations) Latest() Synchronisation
Latest returns the last recorded synchronisation.
type Synchronisation ¶
type Synchronisation struct { Start time.Time `json:"startTime"` End time.Time `json:"endTime"` SHA string `json:"sha"` Error error `json:"err"` Results []common.ResourceSyncResult `json:"results"` }
Synchronisation represents a sync run from the gitops engine.
Click to show internal directories.
Click to hide internal directories.