rt

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const NameCoreNS = "core"

Variables

View Source
var (
	ReadableProto *vm.Protocol // method: -make-reader [x] → reader
	WritableProto *vm.Protocol // method: -make-writer [x] → writer
)

IReadable and IWritable are the IO coercion protocols. Extending these allows user-defined types to participate in the IO system.

View Source
var AsyncSrc string
View Source
var CoreNS *vm.Namespace
View Source
var CoreSrc string
View Source
var CurrentNS *vm.Var
View Source
var EdnSrc string
View Source
var IoSrc string
View Source
var PprintSrc string
View Source
var SetSrc string
View Source
var StringSrc string
View Source
var TestSrc string
View Source
var WalkSrc string

Functions

func AllNSes

func AllNSes() map[string]*vm.Namespace

func DumpNamespaces

func DumpNamespaces(fileName string)

func FuzzyNamespacedSymbolLookup

func FuzzyNamespacedSymbolLookup(currentNS *vm.Namespace, s vm.Symbol) []vm.Symbol

func LookupOrRegisterNS

func LookupOrRegisterNS(name string) *vm.Namespace

func LookupOrRegisterNSNoLoad

func LookupOrRegisterNSNoLoad(name string) *vm.Namespace

func NS

func NS(name string) *vm.Namespace

func RegisterNS

func RegisterNS(namespace *vm.Namespace) *vm.Namespace

func SetNSLoader

func SetNSLoader(loader NSLoader)

Types

type FileStat

type FileStat struct {
	Name    string `letgo:"name"`
	Size    int64  `letgo:"size"`
	IsDir   bool   `letgo:"dir?"`
	ModTime string `letgo:"mod-time"`
}

FileStat is the struct behind os/stat return values.

type HTTPRequest

type HTTPRequest struct {
	RequestMethod string   `letgo:"request-method"`
	Scheme        string   `letgo:"scheme"`
	URI           string   `letgo:"uri"`
	Path          string   `letgo:"path"`
	QueryString   string   `letgo:"query-string"`
	Body          string   `letgo:"body"`
	RemoteAddr    string   `letgo:"remote-addr"`
	ServerAddr    string   `letgo:"server-addr"`
	ServerPort    string   `letgo:"server-port"`
	ContentType   string   `letgo:"content-type"`
	Headers       vm.Value `letgo:"headers"`
}

HTTPRequest is the struct behind ring-style HTTP request maps.

type HTTPResponse

type HTTPResponse struct {
	Status  int      `letgo:"status"`
	Body    vm.Value `letgo:"body"`
	Headers vm.Value `letgo:"headers"`
}

HTTPResponse is the struct behind HTTP client response maps.

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(resp http.ResponseWriter, request *http.Request)

type IOHandle

type IOHandle struct {
	File *os.File
	// contains filtered or unexported fields
}

IOHandle wraps an *os.File with optional buffered reader for line-based reads.

func NewIOHandle

func NewIOHandle(f *os.File) *IOHandle

func (*IOHandle) Close

func (h *IOHandle) Close() error

func (*IOHandle) Reader

func (h *IOHandle) Reader() *bufio.Reader

func (*IOHandle) String

func (h *IOHandle) String() string

type LGBuffer

type LGBuffer struct {
	Buf *bytes.Buffer
}

LGBuffer wraps bytes.Buffer as a readable/writable value.

func (*LGBuffer) Read

func (b *LGBuffer) Read(p []byte) (int, error)

func (*LGBuffer) String

func (b *LGBuffer) String() string

func (*LGBuffer) Write

func (b *LGBuffer) Write(p []byte) (int, error)

type LGReader

type LGReader struct {
	// contains filtered or unexported fields
}

LGReader wraps any io.Reader with optional buffering and close.

func (*LGReader) Buffered

func (r *LGReader) Buffered() *bufio.Reader

func (*LGReader) Close

func (r *LGReader) Close() error

func (*LGReader) Read

func (r *LGReader) Read(p []byte) (int, error)

func (*LGReader) String

func (r *LGReader) String() string

type LGURL

type LGURL struct {
	Scheme   string `letgo:"scheme"`
	Host     string `letgo:"host"`
	Port     string `letgo:"port"`
	Path     string `letgo:"path"`
	Query    string `letgo:"query"`
	Fragment string `letgo:"fragment"`
	UserInfo string `letgo:"user-info"`
	Raw      string `letgo:"raw"`
}

LGURL represents a parsed URL as a record.

type LGWriter

type LGWriter struct {
	// contains filtered or unexported fields
}

LGWriter wraps any io.Writer with optional buffering and close.

func (*LGWriter) Buffered

func (w *LGWriter) Buffered() *bufio.Writer

func (*LGWriter) Close

func (w *LGWriter) Close() error

func (*LGWriter) Flush

func (w *LGWriter) Flush() error

func (*LGWriter) String

func (w *LGWriter) String() string

func (*LGWriter) Write

func (w *LGWriter) Write(p []byte) (int, error)

type Mult

type Mult struct {
	// contains filtered or unexported fields
}

Mult broadcasts values from a source channel to multiple tap channels.

type NSLoader

type NSLoader interface {
	Load(string) *vm.Namespace
}

type Pub

type Pub struct {
	// contains filtered or unexported fields
}

Pub routes values from a source channel to subscribers by topic.

type ShellResult

type ShellResult struct {
	Exit int    `letgo:"exit"`
	Out  string `letgo:"out"`
	Err  string `letgo:"err"`
}

ShellResult is the struct behind os/sh return values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL