Documentation ¶
Index ¶
- Constants
- Variables
- func AddProxyRoute(proxy node.ProxyRoute) error
- func AddStaticRoute(node string, host string, port uint16, options node.RouteOptions) error
- func AddStaticRouteOptions(node string, options node.RouteOptions) error
- func AddStaticRoutePort(node string, port uint16, options node.RouteOptions) error
- func ApplicationInfo(name string) (gen.ApplicationInfo, error)
- func ApplicationLoad(app gen.ApplicationBehavior, args ...etf.Term) (string, error)
- func ApplicationStart(appName string, args ...etf.Term) (gen.Process, error)
- func ApplicationStartPermanent(appName string, args ...etf.Term) (gen.Process, error)
- func ApplicationStartTransient(appName string, args ...etf.Term) (gen.Process, error)
- func ApplicationStop(appName string) error
- func ApplicationUnload(appName string) error
- func Connect(node string) error
- func Disconnect(node string) error
- func Env(name gen.EnvKey) interface{}
- func IsAlias(alias etf.Alias) bool
- func IsAlive() bool
- func IsMonitor(ref etf.Ref) bool
- func Links(process etf.Pid) []etf.Pid
- func ListEnv() map[gen.EnvKey]interface{}
- func LoadedApplications() []gen.ApplicationInfo
- func MakeRef() etf.Ref
- func MonitoredBy(process etf.Pid) []etf.Pid
- func Monitors(process etf.Pid) []etf.Pid
- func MonitorsByName(process etf.Pid) []gen.ProcessID
- func Name() string
- func NetworkStats(name string) (node.NetworkStats, error)
- func Nodes() []string
- func NodesIndirect() []string
- func ProcessByAlias(alias etf.Alias) gen.Process
- func ProcessByName(name string) gen.Process
- func ProcessByPid(pid etf.Pid) gen.Process
- func ProcessInfo(pid etf.Pid) (gen.ProcessInfo, error)
- func ProcessList() []gen.Process
- func ProvideRemoteSpawn(name string, object gen.ProcessBehavior) error
- func ProxyRoute(name string) (node.ProxyRoute, bool)
- func ProxyRoutes() []node.ProxyRoute
- func RegisterBehavior(group, name string, behavior gen.ProcessBehavior, data interface{}) error
- func RegisterName(name string, pid etf.Pid) error
- func RegisteredBehavior(group, name string) (gen.RegisteredBehavior, error)
- func RegisteredBehaviorGroup(group string) []gen.RegisteredBehavior
- func Registrar() node.Registrar
- func RemoveProxyRoute(name string) bool
- func RemoveStaticRoute(name string) bool
- func Resolve(node string) (node.Route, error)
- func ResolveProxy(node string) (node.ProxyRoute, error)
- func RevokeRemoteSpawn(name string) error
- func SetEnv(name gen.EnvKey, value interface{})
- func Spawn(name string, opts gen.ProcessOptions, object gen.ProcessBehavior, ...) (gen.Process, error)
- func StartNode(name string, cookie string, opts node.Options) (node.Node, error)
- func StartNodeWithContext(ctx context.Context, name string, cookie string, opts node.Options) (node.Node, error)
- func StaticRoute(name string) (node.Route, bool)
- func StaticRoutes() []node.Route
- func Stats() node.NodeStats
- func Stop()
- func UnregisterBehavior(group, name string) error
- func UnregisterName(name string) error
- func Uptime() int64
- func Wait()
- func WaitWithTimeout(d time.Duration) error
- func WhichApplications() []gen.ApplicationInfo
Constants ¶
const ( Version = "2.2.4" // Ergo Framework version VersionPrefix = "ergo" // Prefix using for the full version name VersionOTP int = 25 // Erlang version support )
Variables ¶
var (
DefaultNode node.Node
)
Functions ¶
func AddProxyRoute ¶ added in v1.1.225
func AddProxyRoute(proxy node.ProxyRoute) error
func AddStaticRoute ¶ added in v1.1.225
AddStaticRoute adds static route for the given name
func AddStaticRouteOptions ¶ added in v1.1.225
func AddStaticRouteOptions(node string, options node.RouteOptions) error
AddStaticRouteOptions adds static route options for the given node name which does regular port resolving but applies static options
func AddStaticRoutePort ¶ added in v1.1.225
func AddStaticRoutePort(node string, port uint16, options node.RouteOptions) error
AddStaticRoutePort adds static route for the given node name which makes node skip resolving port process
func ApplicationInfo ¶ added in v1.1.225
func ApplicationInfo(name string) (gen.ApplicationInfo, error)
func ApplicationLoad ¶ added in v1.1.225
func ApplicationStart ¶ added in v1.1.225
func ApplicationStartPermanent ¶ added in v1.1.225
func ApplicationStartTransient ¶ added in v1.1.225
func ApplicationStop ¶ added in v1.1.225
func ApplicationUnload ¶ added in v1.1.225
func Disconnect ¶ added in v1.1.225
Disconnect close connection to the node
func IsAlias ¶ added in v1.1.225
IsAlias checks whether the given alias is belongs to the alive process on this node. If the process died all aliases are cleaned up and this function returns false for the given alias. For alias from the remote node always returns false.
func LoadedApplications ¶ added in v1.1.225
func LoadedApplications() []gen.ApplicationInfo
func NetworkStats ¶ added in v1.1.225
func NetworkStats(name string) (node.NetworkStats, error)
NetworkStats returns network statistics of the connection with the node. Returns error ErrUnknown if connection with given node is not established.
func NodesIndirect ¶ added in v1.1.225
func NodesIndirect() []string
NodesIndirect returns the list of nodes connected via proxies
func ProcessByAlias ¶ added in v1.1.225
ProcessByAlias returns Process for the given alias. Returns nil if it doesn't exist (not found) or terminated
func ProcessByName ¶ added in v1.1.225
ProcessByName returns Process for the given name. Returns nil if it doesn't exist (not found) or terminated.
func ProcessByPid ¶ added in v1.1.225
ProcessByPid returns Process for the given Pid. Returns nil if it doesn't exist (not found) or terminated.
func ProcessInfo ¶ added in v1.1.225
func ProcessInfo(pid etf.Pid) (gen.ProcessInfo, error)
ProcessInfo returns the details about given Pid
func ProcessList ¶ added in v1.1.225
ProcessList returns the list of running processes
func ProvideRemoteSpawn ¶ added in v1.1.225
func ProvideRemoteSpawn(name string, object gen.ProcessBehavior) error
func ProxyRoute ¶ added in v1.1.225
func ProxyRoute(name string) (node.ProxyRoute, bool)
ProxyRoute returns proxy route added using AddProxyRoute
func ProxyRoutes ¶ added in v1.1.225
func ProxyRoutes() []node.ProxyRoute
ProxyRoutes returns list of proxy routes added using AddProxyRoute
func RegisterBehavior ¶ added in v1.1.225
func RegisterBehavior(group, name string, behavior gen.ProcessBehavior, data interface{}) error
RegisterBehavior
func RegisteredBehavior ¶ added in v1.1.225
func RegisteredBehavior(group, name string) (gen.RegisteredBehavior, error)
RegisteredBehavior
func RegisteredBehaviorGroup ¶ added in v1.1.225
func RegisteredBehaviorGroup(group string) []gen.RegisteredBehavior
RegisteredBehaviorGroup
func RemoveProxyRoute ¶ added in v1.1.225
func RemoveStaticRoute ¶ added in v1.1.225
Remove static route removes static route with given name
func ResolveProxy ¶ added in v1.1.225
func ResolveProxy(node string) (node.ProxyRoute, error)
ResolveProxy resolves proxy route. Checks for the proxy route added using AddProxyRoute. If it wasn't found makes request to the registrar.
func RevokeRemoteSpawn ¶ added in v1.1.225
func SetEnv ¶ added in v1.1.225
SetEnv set node environment variable with given name. Use nil value to remove variable with given name. Ignores names with "ergo:" as a prefix.
func Spawn ¶ added in v1.1.225
func Spawn(name string, opts gen.ProcessOptions, object gen.ProcessBehavior, args ...etf.Term) (gen.Process, error)
Spawn spawns a new process
func StartNodeWithContext ¶
func StartNodeWithContext(ctx context.Context, name string, cookie string, opts node.Options) (node.Node, error)
StartNodeWithContext create new node with specified context, name and cookie string
func StaticRoute ¶ added in v1.1.225
StaticRoute returns Route for the given name. Returns false if it doesn't exist.
func StaticRoutes ¶ added in v1.1.225
StaticRoutes returns list of routes added using AddStaticRoute
func UnregisterBehavior ¶ added in v1.1.225
UnregisterBehavior
func UnregisterName ¶ added in v1.1.225
func WaitWithTimeout ¶ added in v1.1.225
func WhichApplications ¶ added in v1.1.225
func WhichApplications() []gen.ApplicationInfo
Types ¶
This section is empty.