Skip to content
Snippets Groups Projects
Commit 31dba4e2 authored by fangyincheng's avatar fangyincheng
Browse files

Rem:delete publi

parent 10d89a5d
Branches
Tags
No related merge requests found
package public
//////////////////////////////////////////
// codec type
//////////////////////////////////////////
type CodecType int
const (
CODECTYPE_UNKNOWN CodecType = iota
CODECTYPE_JSONRPC
CODECTYPE_DUBBO
)
var codecTypeStrings = [...]string{
"unknown",
"jsonrpc",
"dubbo",
}
func (c CodecType) String() string {
typ := CODECTYPE_UNKNOWN
switch c {
case CODECTYPE_JSONRPC:
typ = c
case CODECTYPE_DUBBO:
typ = c
}
return codecTypeStrings[typ]
}
func GetCodecType(t string) CodecType {
var typ = CODECTYPE_UNKNOWN
switch t {
case codecTypeStrings[CODECTYPE_JSONRPC]:
typ = CODECTYPE_JSONRPC
case codecTypeStrings[CODECTYPE_DUBBO]:
typ = CODECTYPE_DUBBO
}
return typ
}
package public
const (
DUBBOGO_CTX_KEY = "dubbogo-ctx"
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment