erlang

package
v2.0.63 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DefaultProcessName = "ErlangRPC"
	DefaultCallTimeout = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

func NewErlangNode

func NewErlangNode(c *NodeConfig) (*Node, error)

func (*Node) Call added in v2.0.27

func (s *Node) Call(message *RpcMessage) (etf.Term, error)

func (*Node) CallWithTimeout added in v2.0.27

func (s *Node) CallWithTimeout(req *RpcMessage, timeout int) (etf.Term, error)

func (*Node) Get

func (s *Node) Get() node.Node

func (*Node) Run

func (s *Node) Run()

func (*Node) Spawn added in v2.0.27

func (s *Node) Spawn(name string, opts gen.ProcessOptions, object gen.ProcessBehavior, args ...etf.Term) (gen.Process, error)

func (*Node) Start

func (s *Node) Start() error

func (*Node) Stop

func (s *Node) Stop() error

type NodeConfig

type NodeConfig struct {
	NodeName   string   `yaml:"nodeName" json:"nodeName"`
	Cookie     string   `yaml:"cookie" json:"cookie"`
	ServerName string   `yaml:"serverName" json:"serverName"`
	Nodes      []string `yaml:"nodes" json:"nodes"`
}

type RpcMessage added in v2.0.27

type RpcMessage struct {
	Node string
	Mod  string
	Fun  string
	Args []etf.Term
}

type RpcServer added in v2.0.27

type RpcServer struct {
	gen.Server
	// contains filtered or unexported fields
}

func (*RpcServer) HandleCall added in v2.0.27

func (tgs *RpcServer) HandleCall(process *gen.ServerProcess, from gen.ServerFrom, message etf.Term) (etf.Term, gen.ServerStatus)

func (*RpcServer) HandleCast added in v2.0.27

func (tgs *RpcServer) HandleCast(process *gen.ServerProcess, message etf.Term) gen.ServerStatus

func (*RpcServer) HandleDirect added in v2.0.27

func (tgs *RpcServer) HandleDirect(process *gen.ServerProcess, ref etf.Ref, message interface{}) (interface{}, gen.DirectStatus)

func (*RpcServer) HandleInfo added in v2.0.27

func (tgs *RpcServer) HandleInfo(process *gen.ServerProcess, message etf.Term) gen.ServerStatus

func (*RpcServer) Init added in v2.0.27

func (tgs *RpcServer) Init(process *gen.ServerProcess, args ...etf.Term) error

func (*RpcServer) Terminate added in v2.0.27

func (tgs *RpcServer) Terminate(process *gen.ServerProcess, reason string)

Jump to

Keyboard shortcuts

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