mirror of https://github.com/hashicorp/consul
26 lines
331 B
Go
26 lines
331 B
Go
|
package frame
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
NoError = iota
|
||
|
ProtocolError
|
||
|
InternalError
|
||
|
FlowControlError
|
||
|
StreamClosed
|
||
|
FrameSizeError
|
||
|
RefusedStream
|
||
|
Cancel
|
||
|
NoSuchError
|
||
|
)
|
||
|
|
||
|
type FramingError struct {
|
||
|
error
|
||
|
}
|
||
|
|
||
|
func protoError(fmtstr string, args ...interface{}) FramingError {
|
||
|
return FramingError{fmt.Errorf(fmtstr, args...)}
|
||
|
}
|