package
0.0.2
Repository: https://github.com/john-nguyen09/phpintel.git
Documentation: pkg.go.dev

# Functions

NewConn creates a new connection object around the supplied stream.
NewErrorf builds a Error struct for the supplied message and code.
NewHeaderStream returns a Stream built on top of an io.Reader and io.Writer The messages are sent with HTTP content length and MIME type headers.
NewStream returns a Stream built on top of an io.Reader and io.Writer The messages are sent with no wrapping, and rely on json decode consistency to determine message boundaries.

# Constants

CodeInternalError is not currently returned but defined for completeness.
CodeInvalidParams should be returned by the handler when method parameter(s) were invalid.
CodeInvalidRequest is used when the JSON sent is not a valid Request object.
CodeMethodNotFound should be returned by the handler when the method does not exist / is not available.
CodeParseError is used when invalid JSON was received by the server.
CodeServerOverloaded is returned when a message was refused due to aserver being temporarily unable to accept any new messages.
CodeUnknownError should be used for all non coded errors.
Receive indicates the message is incoming.
Send indicates the message is outgoing.

# Structs

Conn is a JSON RPC 2 client server connection.
No description provided by the author
Error represents a structured error in a Response.
ID is a Request identifier.
Request is sent to a server to represent a Call or Notify operaton.
VersionTag is a special 0 sized struct that encodes as the jsonrpc version tag.
WireRequest is sent to a server to represent a Call or Notify operaton.
WireResponse is a reply to a Request.

# Interfaces

Handler is the interface used to hook into the message handling of an rpc connection.
Stream abstracts the transport mechanics from the JSON RPC protocol.

# Type aliases

Direction is used to indicate to a logger whether the logged message was being sent or received.