Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBatchRequest ¶
Types ¶
type JSONRPCRequest ¶
type JSONRPCRequest struct {
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
ID interface{} `json:"id"`
}
func ParseJSONRPCBatchRequest ¶
func ParseJSONRPCBatchRequest(data []byte, maxBatchSize int) ([]JSONRPCRequest, error)
func ParseJSONRPCRequest ¶
func ParseJSONRPCRequest(data []byte) (*JSONRPCRequest, error)
type JSONRPCResponse ¶
type JSONRPCResponse struct {
JSONRPC string `json:"jsonrpc"`
Result json.RawMessage `json:"result,omitempty"`
Error *errors.JSONRPCError `json:"error,omitempty"`
ID interface{} `json:"id"`
}
func ParseJSONRPCResponse ¶
func ParseJSONRPCResponse(data []byte) (*JSONRPCResponse, error)
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) ForwardLoop ¶
type SchemaCache ¶ added in v0.2.0
type SchemaCache interface {
Get(key string) (json.RawMessage, bool)
Set(key string, schema json.RawMessage)
Delete(key string)
Clear()
}
type ServerHealthStatus ¶ added in v0.2.0
type ServerHealthStatus string
const ( StatusRunning ServerHealthStatus = "running" StatusError ServerHealthStatus = "error" StatusStopped ServerHealthStatus = "stopped" StatusStarting ServerHealthStatus = "starting" StatusUnresponsive ServerHealthStatus = "unresponsive" )
type ServerStatus ¶ added in v0.2.0
type ServerStatus struct {
Name string `json:"name"`
Status ServerHealthStatus `json:"status"`
Uptime time.Duration `json:"uptime"`
LastResponseTime time.Time `json:"last_response_time"`
LastError string `json:"last_error,omitempty"`
RestartCount int `json:"restart_count"`
RequestCount int64 `json:"request_count"`
ErrorRate float64 `json:"error_rate"`
MemoryMB int64 `json:"memory_mb,omitempty"`
CPUPercent float64 `json:"cpu_percent,omitempty"`
}
type ServerStatusList ¶ added in v0.2.0
type ServerStatusList struct {
Timestamp time.Time `json:"timestamp"`
Servers []ServerStatus `json:"servers"`
}
Click to show internal directories.
Click to hide internal directories.