Documentation ¶
Index ¶
- Variables
- func ListenAndServe(proto, addr string, service Service) error
- func LocalCall(service Service, stdin io.ReadCloser, stdout DockerConn, args ...string) error
- func RestoreTerminal(state *term.State)
- func Serve(conn DockerConn, service Service) error
- func SetRawTerminal() (*term.State, error)
- func Subcmd(output io.Writer, name, signature, description string) *flag.FlagSet
- type Cmd
- type CmdMethod
- type DockerConn
- type DockerConnOptions
- type DockerLocalConn
- func (c *DockerLocalConn) Close() error
- func (c *DockerLocalConn) CloseRead() error
- func (c *DockerLocalConn) CloseWrite() error
- func (c *DockerLocalConn) Flush() error
- func (c *DockerLocalConn) GetOptions() *DockerConnOptions
- func (c *DockerLocalConn) Read(b []byte) (int, error)
- func (c *DockerLocalConn) SetOptionRawTerminal()
- func (c *DockerLocalConn) Write(b []byte) (int, error)
- type DockerTCPConn
- func (c *DockerTCPConn) Close() error
- func (c *DockerTCPConn) CloseRead() error
- func (c *DockerTCPConn) CloseWrite() error
- func (c *DockerTCPConn) Flush() error
- func (c *DockerTCPConn) GetOptions() *DockerConnOptions
- func (c *DockerTCPConn) Read(b []byte) (int, error)
- func (c *DockerTCPConn) SetOptionRawTerminal()
- func (c *DockerTCPConn) Write(b []byte) (int, error)
- type Service
Constants ¶
This section is empty.
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?
View Source
var UnknownDockerProto = fmt.Errorf("Only TCP is actually supported by Docker at the moment")
Functions ¶
func ListenAndServe ¶
Listen on `addr`, using protocol `proto`, for incoming rcli calls, and pass them to `service`.
func LocalCall ¶
func LocalCall(service Service, stdin io.ReadCloser, stdout DockerConn, args ...string) error
func RestoreTerminal ¶ added in v0.1.4
func Serve ¶
func Serve(conn DockerConn, service Service) error
Parse an rcli call on a new connection, and pass it to `service` if it is valid.
func SetRawTerminal ¶ added in v0.1.4
FIXME: move these function to utils.go (in rcli to avoid import loop)
Types ¶
type DockerConn ¶ added in v0.1.4
type DockerConn interface { io.ReadWriteCloser CloseWrite() error CloseRead() error GetOptions() *DockerConnOptions SetOptionRawTerminal() Flush() error }
type DockerConnOptions ¶ added in v0.1.4
type DockerConnOptions struct {
RawTerminal bool
}
type DockerLocalConn ¶ added in v0.1.4
type DockerLocalConn struct {
// contains filtered or unexported fields
}
func NewDockerLocalConn ¶ added in v0.1.4
func NewDockerLocalConn(w io.WriteCloser) *DockerLocalConn
func (*DockerLocalConn) Close ¶ added in v0.1.4
func (c *DockerLocalConn) Close() error
func (*DockerLocalConn) CloseRead ¶ added in v0.1.4
func (c *DockerLocalConn) CloseRead() error
func (*DockerLocalConn) CloseWrite ¶ added in v0.1.4
func (c *DockerLocalConn) CloseWrite() error
func (*DockerLocalConn) Flush ¶ added in v0.1.4
func (c *DockerLocalConn) Flush() error
func (*DockerLocalConn) GetOptions ¶ added in v0.1.4
func (c *DockerLocalConn) GetOptions() *DockerConnOptions
func (*DockerLocalConn) Read ¶ added in v0.1.4
func (c *DockerLocalConn) Read(b []byte) (int, error)
func (*DockerLocalConn) SetOptionRawTerminal ¶ added in v0.1.4
func (c *DockerLocalConn) SetOptionRawTerminal()
type DockerTCPConn ¶ added in v0.1.4
type DockerTCPConn struct {
// contains filtered or unexported fields
}
func NewDockerTCPConn ¶ added in v0.1.4
func NewDockerTCPConn(conn *net.TCPConn, client bool) *DockerTCPConn
func (*DockerTCPConn) Close ¶ added in v0.1.4
func (c *DockerTCPConn) Close() error
func (*DockerTCPConn) CloseRead ¶ added in v0.1.4
func (c *DockerTCPConn) CloseRead() error
func (*DockerTCPConn) CloseWrite ¶ added in v0.1.4
func (c *DockerTCPConn) CloseWrite() error
func (*DockerTCPConn) Flush ¶ added in v0.1.4
func (c *DockerTCPConn) Flush() error
func (*DockerTCPConn) GetOptions ¶ added in v0.1.4
func (c *DockerTCPConn) GetOptions() *DockerConnOptions
func (*DockerTCPConn) SetOptionRawTerminal ¶ added in v0.1.4
func (c *DockerTCPConn) SetOptionRawTerminal()
Click to show internal directories.
Click to hide internal directories.