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

@ -117,6 +117,8 @@ func (r *ProxyRepository) CreateProxy(ctx context.Context, name store.ProxyName,
return nil, errors.WithStack(err)
}
go r.notifyChange(CreateOperation, name)
return &store.Proxy{
ProxyHeader: store.ProxyHeader{
Name: name,
@ -139,6 +141,8 @@ func (r *ProxyRepository) DeleteProxy(ctx context.Context, name store.ProxyName)
return errors.WithStack(cmd.Err())
}
go r.notifyChange(DeleteOperation, name)
return nil
}
@ -242,6 +246,8 @@ func (r *ProxyRepository) UpdateProxy(ctx context.Context, name store.ProxyName,
return nil, errors.WithStack(err)
}
go r.notifyChange(UpdateOperation, name)
return proxy, nil
}