MCPcopy Index your code
hub / github.com/roadrunner-server/goridge

github.com/roadrunner-server/goridge @v3.8.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.8.3 ↗ · + Follow
158 symbols 1,114 edges 17 files 66 documented · 42% 1 cross-repo links updated 6d agov4.0.0-beta.2 · 2026-05-09★ 1,293
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

High-performance PHP-to-Golang IPC bridge

GoDoc Linux macOS Windows Go Report Card Codecov

PHPClasses Innovation Award

Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package. The library allows you to call Go service methods from PHP with a minimal footprint, structures and []byte support.
PHP source code can be found in this repository: goridge-php

See https://github.com/roadrunner-server/roadrunner - High-performance PHP application server, load-balancer and process manager written in Golang

Features

  • no external dependencies or services, drop-in (64bit PHP version required)
  • low message footprint (12 bytes over any binary payload), binary error detection
  • CRC32 header verification
  • sockets over TCP or Unix (ext-sockets is required), standard pipes
  • very fast (300k calls per second on Ryzen 1700X over 20 threads)
  • native net/rpc integration, ability to connect to existed application(s)
  • standalone protocol usage
  • structured data transfer using json
  • []byte transfer, including big payloads
  • service, message and transport level error handling
  • hackable
  • works on Windows
  • unix sockets powered (also on Windows)

Installation

GO111MODULE=on go get github.com/roadrunner-server/goridge/v3

Sample of usage

package main

import (
    "fmt"
    "net"
    "net/rpc"

    goridgeRpc "github.com/roadrunner-server/goridge/v3/pkg/rpc"
)

type App struct{}

func (s *App) Hi(name string, r *string) error {
    *r = fmt.Sprintf("Hello, %s!", name)
    return nil
}

func main() {
    ln, err := net.Listen("tcp", ":6001")
    if err != nil {
        panic(err)
    }

    _ = rpc.Register(new(App))

    for {
        conn, err := ln.Accept()
        if err != nil {
            continue
        }
        _ = conn
        go rpc.ServeCodec(goridgeRpc.NewCodec(conn))
    }
}

License

The MIT License (MIT). Please see LICENSE for more information.

Extension points exported contracts — how you extend this code

Relay (Interface)
Relay provide IPC over signed payloads. [2 implementers]
pkg/relay/interface.go

Core symbols most depended-on inside this repo

Header
called by 281
pkg/frame/frame.go
ReadFlags
called by 40
pkg/frame/frame.go
ReadPayloadLen
called by 37
pkg/frame/frame.go
ReadVersion
called by 36
pkg/frame/frame.go
NewFrame
called by 35
pkg/frame/frame.go
VerifyCRC
called by 34
pkg/frame/frame.go
ReadOptions
called by 32
pkg/frame/frame.go
WritePayloadLen
called by 32
pkg/frame/frame.go

Shape

Method 87
Function 55
Struct 14
Interface 2

Languages

Go100%

Modules by API surface

pkg/frame/frame.go34 symbols
tests/message.pb.go28 symbols
pkg/frame/frame_test.go20 symbols
pkg/rpc/codec.go13 symbols
pkg/rpc/client_server_test.go13 symbols
pkg/rpc/client.go10 symbols
benchmarks/main.go9 symbols
pkg/socket/socket.go5 symbols
pkg/pipe/pipe.go5 symbols
pkg/socket/socket_test.go4 symbols
pkg/relay/interface.go4 symbols
internal/bpool.go4 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add goridge \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page