-
Notifications
You must be signed in to change notification settings - Fork 838
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67c9a2d
commit 36b87c4
Showing
7 changed files
with
181 additions
and
45 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
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
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,31 @@ | ||
/* | ||
* Copyright 2024 CloudWeGo 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 kerrors | ||
|
||
var ( | ||
ErrStreaming = basicError{message: "streaming error"} | ||
|
||
ErrTimeout = ErrStreaming.WithChild("timeout") | ||
ErrCanceled = ErrStreaming.WithChild("canceled") | ||
ErrMeta = ErrStreaming.WithChild("meta information error") | ||
ErrGracefulShutdown = ErrStreaming.WithChild("graceful shutdown") | ||
|
||
ErrStreamTimeout = ErrTimeout.WithChild("whole stream timeout") | ||
ErrUpstreamBizCanceled = ErrCanceled.WithChild("upstream business canceled") | ||
ErrMetaSizeExceed = ErrMeta.WithChild("size exceeds limit") | ||
ErrMetaContentIllegal = ErrMeta.WithChild("content illegal") | ||
) |
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,48 @@ | ||
/* | ||
* | ||
* Copyright 2014 gRPC 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. | ||
* | ||
* This file may have been modified by CloudWeGo authors. All CloudWeGo | ||
* Modifications are Copyright 2021 CloudWeGo Authors. | ||
*/ | ||
|
||
package errors | ||
|
||
import ( | ||
"github.com/cloudwego/kitex/pkg/kerrors" | ||
) | ||
|
||
// this package contains all the errors suitable for Kitex errors model | ||
|
||
var ( | ||
errStream = kerrors.ErrStreaming.WithChild("gRPC stream") | ||
ErrHTTP2Stream = errStream.WithChild("HTTP2Stream error when parsing frame") | ||
ErrClosedWithoutTrailer = errStream.WithChild("") | ||
ErrMiddleHeader = errStream.WithChild("") | ||
ErrDecodeHeader = errStream.WithChild("") | ||
ErrProxyTrailer = errStream.WithChild("") | ||
ErrRecvRstStream = errStream.WithChild("") | ||
ErrRecvProxyRstStream = errStream.WithChild("") | ||
ErrStreamDrain = errStream.WithChild("") | ||
ErrStreamFlowControl = errStream.WithChild("") | ||
|
||
errConnection = kerrors.ErrStreaming.WithChild("gRPC connection") | ||
ErrHTTP2Connection = errConnection.WithChild("read HTTP2 Frame failed") | ||
ErrEstablishConnection = errConnection.WithChild("establish connection failed") | ||
ErrHandleGoAway = errConnection.WithChild("handles GoAway Frame failed") | ||
ErrKeepAlive = errConnection.WithChild("keepalive related") | ||
ErrOperateHeaders = errConnection.WithChild("operate Header Frame failed") | ||
ErrNoActiveStream = errConnection.WithChild("no active stream") | ||
) |
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
Oops, something went wrong.