Documentation ¶
Index ¶
- Constants
- Variables
- func Call(proto, addr string, args ...string) (*net.TCPConn, error)
- func ListenAndServe(proto, addr string, service Service) error
- func ListenAndServeHTTP(addr string, service Service) error
- func LocalCall(service Service, stdin io.ReadCloser, stdout io.Writer, args ...string) error
- func Serve(conn io.ReadWriter, service Service) error
- func Subcmd(output io.Writer, name, signature, description string) *flag.FlagSet
- func URLToCall(u *url.URL) (method string, args []string)
- type AutoFlush
- type Cmd
- type CmdMethod
- type Service
Constants ¶
View Source
const ARG_URL_KEY = "q"
Use this key to encode an RPC call into an URL, eg. domain.tld/path/to/method?q=get_user&q=gordon
Variables ¶
View Source
var CLIENT_SOCKET io.Writer = nil
View Source
var DEBUG_FLAG bool = false
Note: the globals are here to avoid import cycle FIXME: Handle debug levels mode?
Functions ¶
func Call ¶
Connect to a remote endpoint using protocol `proto` and address `addr`, issue a single call, and return the result. `proto` may be "tcp", "unix", etc. See the `net` package for available protocols.
func ListenAndServe ¶
Listen on `addr`, using protocol `proto`, for incoming rcli calls, and pass them to `service`.
func ListenAndServeHTTP ¶
Types ¶
type AutoFlush ¶
type AutoFlush struct {
http.ResponseWriter
}
Click to show internal directories.
Click to hide internal directories.