rpc

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Deprecated: using arpc instead

Deprecated: using arpc instead

Deprecated: using arpc instead

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRpcContainer

func NewRpcContainer(
	addr string,
	apps []RpcApplication,
	opts ...RpcOption) scene.Scene

NewRpcContainer create a rpc container

for now, rpc is only safe to use in the internal network there are no authentication middleware for now.

Types

type Client

type Client interface {
	Dial() error
	Call(serviceMethod string, args any, reply any) error
}

Client is a rpc client manage tcp connection it will establish connection when needed and reconnect if socket breaks.

func NewClient

func NewClient(network string, addr string) Client

func NewHttpClient

func NewHttpClient(network string, addr string, path string) Client

type Dialer

type Dialer interface {
	Dial() (*rpc.Client, error)
}

type RpcApplication

type RpcApplication interface {
	scene.Application
	RegisterService(server *rpc.Server) error
}

type RpcOption

type RpcOption func()

Jump to

Keyboard shortcuts

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