feat: observe changes in repository to automatically clear cache
All checks were successful
Cadoles/bouncer/pipeline/pr-master This commit looks good
All checks were successful
Cadoles/bouncer/pipeline/pr-master This commit looks good
This commit is contained in:
@ -73,6 +73,8 @@ func (r *LayerRepository) CreateLayer(ctx context.Context, proxyName store.Proxy
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
go r.notifyChange(CreateOperation, proxyName, layerName)
|
||||
|
||||
return &store.Layer{
|
||||
LayerHeader: store.LayerHeader{
|
||||
Name: store.LayerName(layerItem.Name),
|
||||
@ -96,6 +98,8 @@ func (r *LayerRepository) DeleteLayer(ctx context.Context, proxyName store.Proxy
|
||||
return errors.WithStack(cmd.Err())
|
||||
}
|
||||
|
||||
go r.notifyChange(DeleteOperation, proxyName, layerName)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -249,6 +253,8 @@ func (r *LayerRepository) UpdateLayer(ctx context.Context, proxyName store.Proxy
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
go r.notifyChange(UpdateOperation, proxyName, layerName)
|
||||
|
||||
return layer, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user