{"modulePath":"github.com/glojurelang/glojure","version":"v0.7.25","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package nrepl\n\n## Functions\n\n```go\nfunc BencodeDecode(r io.Reader) (interface{}, error)\n```\nBencodeDecode reads one bencoded value from the reader. Returns string, int64, \\[]interface{}, or map\\[string]interface{}.\n\n```go\nfunc BencodeEncode(v interface{}) ([]byte, error)\n```\nBencodeEncode encodes a value to bencode format. Supported types: string, int/int64, \\[]interface{}, map\\[string]interface{}.\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient connects to a running nREPL server.\n\n```go\nfunc Connect(host string, port int) (*Client, error)\n```\nConnect dials an nREPL server and clones a session.\n\n```go\nfunc (c *Client) Close() error\n```\nClose closes the session and connection.\n\n```go\nfunc (c *Client) Completions(prefix, ns string) ([]CompletionEntry, error)\n```\nCompletions requests completions for prefix in the given namespace.\n\n```go\nfunc (c *Client) Eval(code string) (value, ns, out string, err error)\n```\nEval sends code to the server for evaluation. It returns the printed value, the current namespace, any stdout output, and any error. Stdout output is accumulated from \"out\" messages.\n\n```go\nfunc (c *Client) NS() string\n```\nNS returns the current namespace from the server.\n\n```go\ntype CompletionEntry struct {\n\tCandidate string\n\tNS        string // namespace the symbol is defined in\n\tType      string // \"namespace\", \"function\", etc.\n}\n```\nCompletionEntry holds a completion candidate with optional metadata.\n\n```go\ntype Server struct {\n\t// contains filtered or unexported fields\n}\n```\nServer is a minimal nREPL server for editor integration.\n\n```go\nfunc Start(host string, port int, portFile string) (*Server, error)\n```\nStart creates and starts an nREPL server on the given host and port. Port 0 means auto-assign a free port.\n\n```go\nfunc (s *Server) Host() string\n```\nHost returns the host the server is listening on.\n\n```go\nfunc (s *Server) Port() int\n```\nPort returns the port the server is listening on.\n\n```go\nfunc (s *Server) Serve()\n```\nServe accepts connections in a loop. Blocks until Stop is called.\n\n```go\nfunc (s *Server) Stop()\n```\nStop shuts down the server and cleans up the port file.\n\n```go\ntype Session struct {\n\tID string\n\tNS string // current namespace name\n}\n```\nSession tracks per-session state for an nREPL client.\n\n","path":"github.com/glojurelang/glojure/pkg/nrepl","name":"nrepl","synopsis":"","isRedistributable":true}
