
ToolipsRemote.ToolipsRemote — ModuleCreated in June, 2022 by chifi - an open source software dynasty. by team toolips This software is MIT-licensed.
ToolipsRemote
Extension for:
- Toolips This module provides the server extension Remote, an extension
that allows one to remotely call server commands from another Julia terminal. You can connect to a served Remote extension using the connect method.
Module Composition
ToolipsRemote.Hash — TypeHash
- f::Function - The f function is used to return the Hash's value. Creates an anonymous hashing function for a string of length(n). Can be indexed with nothing to retrieve Hash.
example
# 64-character hash
h = Hash(64) # vv getindex(::Hash)
buffer = Base.SecretBuffer(hash[])
if String(buffer.data) == "Password"constructors
- Hash(n::Integer = 32)
- Hash(s::String)
ToolipsRemote.Remote — TypeRemote <: Toolips.ServerExtension
- type::Vector{Symbol}
- remotefunction::Function
- f::Function
- logins::Dict{String, Hash}
- users::Dict
- motd::String - A message to be shown at the login screen.
The remote extension makes it possible to connect to your server from another Julia REPL. Can be provided with an alternative remote function as the first positional argument, as well as a new serving function as the second positional argument. A remote function should take a Connection and a String. A serving function should take only a Connection.
example
r = Remote()
st = ServerTemplate(extensions = [Remote()])constructors
Remote(remotefunction::Function = evaluator, usernames::Vector{String}; motd::String, serving_f::Function)
ToolipsRemote.connect — MethodRemote
connect(url::String) -> _
Connects to a toolips session extension at the given URL. Ensure http:// is provided prior to the URL.
example
connect("http://127.0.0.1:8000")ToolipsRemote.connected_repl — MethodRemote
getindex(h::Hash) -> ::String
Creates the linked remote REPL.
example
connectedrepl("myrepl", "http://127.0.0.1:8000", key::String)ToolipsRemote.evaluator — MethodRemote
getindex(h::Hash) -> ::String
Runs eval on any incoming connection strings.
example
connectedrepl("myrepl", "http://127.0.0.1:8000", key::String)ToolipsRemote.getindex — MethodRemote
getindex(h::Hash) -> ::String
Retrieves the value of the hashed data.
example
pwd = h[]ToolipsRemote.helpme — Methodhelpme(args::Vector{String}) -> ::String
This is one of the default controller() functions. All of these functions are going to take args::Vector{String}. This will be the only function with this sort of documentation, as the rest will contain arg usage.
ToolipsRemote.serve_remote — MethodRemote
serve_remote(c::Connection) -> _
Servers a remote login via the connect() method. This method is routed to /remote/connect