mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DualWriter: Return error for unsupported watch (#93159)
This commit is contained in:
parent
e3fd9f9e58
commit
2f792ee4ae
@ -283,8 +283,9 @@ func (d *DualWriterMode1) Destroy() {
|
||||
}
|
||||
|
||||
func (d *DualWriterMode1) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error) {
|
||||
d.Log.Error(errors.New("Watch not implemented in mode 1"), "Watch not implemented in mode 1")
|
||||
return nil, nil
|
||||
err := errors.New("Watch not implemented in mode 1")
|
||||
d.Log.Error(err, err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (d *DualWriterMode1) GetSingularName() string {
|
||||
|
@ -331,8 +331,9 @@ func (d *DualWriterMode2) Update(ctx context.Context, name string, objInfo rest.
|
||||
}
|
||||
|
||||
func (d *DualWriterMode2) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error) {
|
||||
d.Log.Error(errors.New("Watch not implemented in mode 2"), "Watch not implemented in mode 2")
|
||||
return nil, nil
|
||||
err := errors.New("Watch not implemented in mode 2")
|
||||
d.Log.Error(err, err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (d *DualWriterMode2) Destroy() {
|
||||
|
Loading…
Reference in New Issue
Block a user