-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: move operator handler to schedule
Signed-off-by: lhy1024 <[email protected]>
- Loading branch information
Showing
10 changed files
with
622 additions
and
530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2023 TiKV Project Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package errs | ||
|
||
import "github.com/pingcap/errors" | ||
|
||
var ( | ||
// ErrOperatorNotFound is error info for operator not found. | ||
ErrOperatorNotFound = errors.New("operator not found") | ||
// ErrAddOperator is error info for already have an operator when adding operator. | ||
ErrAddOperator = errors.New("failed to add operator, maybe already have one") | ||
// ErrRegionNotAdjacent is error info for region not adjacent. | ||
ErrRegionNotAdjacent = errors.New("two regions are not adjacent") | ||
// ErrRegionNotFound is error info for region not found. | ||
ErrRegionNotFound = func(regionID uint64) error { | ||
return errors.Errorf("region %v not found", regionID) | ||
} | ||
// ErrRegionAbnormalPeer is error info for region has abnormal peer. | ||
ErrRegionAbnormalPeer = func(regionID uint64) error { | ||
return errors.Errorf("region %v has abnormal peer", regionID) | ||
} | ||
// ErrStoreNotFoundByID is error info for store not found. | ||
ErrStoreNotFoundByID = func(storeID uint64) error { | ||
return errors.Errorf("store %v not found", storeID) | ||
} | ||
// ErrPluginNotFound is error info for plugin not found. | ||
ErrPluginNotFound = func(pluginPath string) error { | ||
return errors.Errorf("plugin is not found: %s", pluginPath) | ||
} | ||
) |
Oops, something went wrong.