package iroh
Import Path
/pkg/rpc/iroh (on go.dev)
Dependency Relation
imports 10 packages, and imported by 0 packages
Involved Source Files
iroh.go
Package-Level Type Names (total 3)
ClientOpts arpc.ClientOpts
Only sync selected states.
Consumer is an optional target for the [states.SendPayload] state.
Forcefully disable am-dbg conns for netmachs.
Enable client-side mutation filtering by performing relations resolution
based on locally active states. Doesn't work with [ClientOpts.NoSchema].
TODO not implemented yet
Make this client schema-less (infer an empty one for tracked states).
Parent is a parent state machine for a new Client state machine. See
[am.Opts].
Skip syncing of these states.
Sync machine time for every mutation. Disables
[ClientOpts.SyncShallowClocks].
TODO de-activates states for no reason
Only activete/deactivate (0-1) clock values will be sent.
Connect via WebSocket using path, eg "/" (default for WASM).
Pubkey to be sent as Bearer token for WebSocket connections.
Key key.SecretKey
OptsIroh []iroh.Option
func NewClient(ctx context.Context, irohAddr string, id string, netSrcSchema am.Schema, opts *ClientOpts) (*arpc.Client, *iroh.Endpoint, error)
AllowedPubKeys []key.PublicKey
MuxOpts arpc.MuxOpts
See [ServerOpts.Args].
See [ServerOpts.ArgsUnmarshaller].
NewServerFn is a function to create a new RPC server for each incoming
connection. Optional.
Parent is a parent state machine for a new Mux state machine. See
[am.Opts].
OptsIroh []iroh.Option
SecretKey *key.SecretKey
func NewMux(ctx context.Context, addr string, name string, stateSource am.Api, opts *MuxOpts) (*arpc.Mux, *iroh.Endpoint, error)
AllowedPubKeys []key.PublicKey
OptsIroh []iroh.Option
SecretKey *key.SecretKey
ServerOpts arpc.ServerOpts
AllowedIds will limit clients to specified IDs (optional).
optional list of typed args
optional RPC args parser, defaults to [amhelp.NewArgsUnmarshaller] when
[ServerOpts.Args] present. Useful for REPLs.
Parent is a parent state machine for a new Server state machine.
// Typed arguments struct pointer
Listen on a WebSocket connection instead of TCP.
List of allowed API keys (optional).
HTTP URL without proto to tunnel the TCP listen over a WebSocket conn.
See WsListenPath.
WebSocketTunnelPubKey is the API key used for authenticating with the
WebSocket tunnel.
func NewServer(ctx context.Context, addr string, name string, stateSource am.Api, opts *ServerOpts) (*arpc.Server, *iroh.Endpoint, error)
Package-Level Functions (total 3)
NewClient is [arpc.NewClient] decorated with a go-iroh overlay.
NewMux is [arpc.NewMux] decorated with a go-iroh overlay.
NewServer is [arpc.NewServer] decorated with a go-iroh overlay.
Package-Level Constants (only one)
const ALPN = "arpc/1"
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |