{"modulePath":"github.com/protocolone/go-plugins","version":"v0.17.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package msgpackrpc\n\nPackage msgpackrpc provides a msgpack-rpc codec\n\n## Constants\n\n```go\nconst (\n\tRequestType      = 0\n\tResponseType     = 1\n\tNotificationType = 2\n\n\tRequestPackSize      = 4\n\tResponsePackSize     = 4\n\tNotificationPackSize = 3\n)\n```\nThe msgpack-rpc specification: [https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md)\n\n## Variables\n\n```go\nvar (\n\tErrBadPackSize      = errors.New(\"Bad pack size\")\n\tErrBadMessageType   = errors.New(\"Bad message type\")\n\tErrBadErrorType     = errors.New(\"Bad error type\")\n\tErrUnexpectedParams = errors.New(\"Unexpected params\")\n\tErrNotEncodable     = errors.New(\"Not encodable\")\n\tErrNotDecodable     = errors.New(\"Not decodable\")\n)\n```\n\n## Functions\n\n```go\nfunc NewCodec(rwc io.ReadWriteCloser) codec.Codec\n```\n\n## Types\n\n```go\ntype Notification struct {\n\tMethod string\n\tBody   interface{}\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (n *Notification) DecodeMsg(mr *msgp.Reader) error\n```\n\n```go\nfunc (n *Notification) EncodeMsg(w *msgp.Writer) error\n```\nEncodeMsg encodes the notification to writer. The body is expected to be an encodable type.\n\n```go\ntype Request struct {\n\tID     uint32\n\tMethod string\n\tBody   interface{}\n\t// contains filtered or unexported fields\n}\n```\nRequest is what the client can construct to be sent to the server. The params represents the body of the request.\n\n```go\nfunc (r *Request) DecodeMsg(mr *msgp.Reader) error\n```\n\n```go\nfunc (r *Request) EncodeMsg(w *msgp.Writer) error\n```\nEncodeMsg encodes the request to writer. The body is expected to be an encodable type.\n\n```go\ntype Response struct {\n\tID    uint32\n\tError string\n\tBody  interface{}\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r *Response) DecodeMsg(mr *msgp.Reader) error\n```\n\n```go\nfunc (r *Response) EncodeMsg(w *msgp.Writer) error\n```\n\n","path":"github.com/protocolone/go-plugins/codec/msgpackrpc","name":"msgpackrpc","synopsis":"Package msgpackrpc provides a msgpack-rpc codec","isRedistributable":true}
