feat: observe changes in repository to automatically clear cache
All checks were successful
Cadoles/bouncer/pipeline/pr-master This commit looks good

This commit is contained in:
2025-08-13 18:20:58 +02:00
parent ad4f334bc2
commit 80a1b48966
8 changed files with 229 additions and 4 deletions

View File

@ -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
}