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:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user