File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2025 The Kubernetes Authors.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ package multicluster
18
+
19
+ import (
20
+ "errors"
21
+ )
22
+
23
+ var (
24
+ // ErrClusterNotFound can be returned by provider implementations if the cluster requested
25
+ // doesn't exist and cannot be constructed.
26
+ ErrClusterNotFound = errClusterNotFound ()
27
+ )
28
+
29
+ func errClusterNotFound () error { return errors .New ("cluster not found" ) }
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ type Provider interface {
54
54
// Get returns a cluster for the given identifying cluster name. Get
55
55
// returns an existing cluster if it has been created before.
56
56
// If no cluster is known to the provider under the given cluster name,
57
- // an error should be returned.
57
+ // ErrClusterNotFound should be returned.
58
58
Get (ctx context.Context , clusterName string ) (cluster.Cluster , error )
59
59
60
60
// IndexField indexes the given object by the given field on all engaged
You can’t perform that action at this time.
0 commit comments