Document defaults
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
374f04d0e9
commit
bae47820d7
@ -165,6 +165,8 @@ type DeleteImageRequest struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Sync indicates that the delete and cleanup should be done
|
||||
// synchronously before returning to the caller
|
||||
//
|
||||
// Default is false
|
||||
Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -118,5 +118,7 @@ message DeleteImageRequest {
|
||||
|
||||
// Sync indicates that the delete and cleanup should be done
|
||||
// synchronously before returning to the caller
|
||||
//
|
||||
// Default is false
|
||||
bool sync = 2;
|
||||
}
|
||||
|
@ -230,6 +230,7 @@ func (s *gcScheduler) run(ctx context.Context) {
|
||||
interval = time.Second
|
||||
gcTime time.Duration
|
||||
collections int
|
||||
// TODO(dmcg): expose collection stats as metrics
|
||||
|
||||
triggered bool
|
||||
deletions int
|
||||
@ -270,6 +271,7 @@ func (s *gcScheduler) run(ctx context.Context) {
|
||||
(s.mutationThreshold > 0 && mutations >= s.mutationThreshold))) {
|
||||
// Check if not already scheduled before delay threshold
|
||||
if nextCollection == nil || nextCollection.After(time.Now().Add(s.scheduleDelay)) {
|
||||
// TODO(dmcg): track re-schedules for tuning schedule config
|
||||
schedC, nextCollection = schedule(s.scheduleDelay)
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ func init() {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return NewService(m.(*metadata.DB), g.(gcScheduler), ic.Events), nil
|
||||
return NewService(m.(*metadata.DB), ic.Events, g.(gcScheduler)), nil
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -52,7 +52,7 @@ type service struct {
|
||||
}
|
||||
|
||||
// NewService returns the GRPC image server
|
||||
func NewService(db *metadata.DB, gc gcScheduler, publisher events.Publisher) imagesapi.ImagesServer {
|
||||
func NewService(db *metadata.DB, publisher events.Publisher, gc gcScheduler) imagesapi.ImagesServer {
|
||||
return &service{
|
||||
db: db,
|
||||
gc: gc,
|
||||
|
Loading…
Reference in New Issue
Block a user