Documentation
¶
Index ¶
- Constants
- func CompareJSONIsSame(a *simplejson.Json, b *simplejson.Json) bool
- func DigestJSONForEqual(jsonVal *simplejson.Json) string
- func MakeJSONRpcErrorResponse(id interface{}, code int, message string, data interface{}) ([]byte, error)
- func MakeJSONRpcSuccessResponse(id interface{}, result interface{}) ([]byte, error)
- func StartServer(config *Config)
- type Config
- type WorkerResponse
Constants ¶
View Source
const JSONRPC_INTERNAL_ERROR_CODE = -32603
View Source
const JSONRPC_INVALID_REQUEST_ERROR_CODE = -32600
View Source
const JSONRPC_INVALID_REQUEST_PARAMS_ERROR_CODE = -32602
View Source
const JSONRPC_METHOD_NOT_FOUND_ERROR_CODE = -32601
View Source
const JSONRPC_PARSE_ERROR_CODE = -32700
View Source
const JSONRPC_SERVER_ERROR_CODE_START = -32000 // [-32000, -32099]
Variables ¶
This section is empty.
Functions ¶
func CompareJSONIsSame ¶
func CompareJSONIsSame(a *simplejson.Json, b *simplejson.Json) bool
whether json a and json b have the same value
func DigestJSONForEqual ¶
func DigestJSONForEqual(jsonVal *simplejson.Json) string
Types ¶
type Config ¶
type Config struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
RequestTimeoutSeconds int `yaml:"request_timeout_seconds"`
Workers []string `yaml:"workers"`
JSONRpcQueryMethods []string `yaml:"jsonrpc_query_methods"`
LogPath string `yaml:"logpath"`
}
func ReadConfigFromYaml ¶
type WorkerResponse ¶
Click to show internal directories.
Click to hide internal directories.