client

package
v0.0.0-...-a426fde Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdDefaults = Command{Timeout: 100}
View Source
var CmdDefaults2 = Command2{Command: CmdDefaults, OutType: "both"}

Functions

func DumpOutput

func DumpOutput(source *os.File)

func SendInput

func SendInput(sink *os.File)

Types

type Client

type Client interface {
	ListServers(timeout int) chan *ServerInfo
	RequestOutput(dest string, otype common.OutputType, resolve bool, timeout int) (outPipe *os.File, err error)
	RequestCommand(dest string, otype common.OutputType, buffered, resolve bool, timeout int) (inPipe *os.File, outPipe *os.File, err error)
	SendCommand(dest string, otype common.OutputType, command string, resolve bool, timeout int) (outPipe *os.File, err error)
	Close() error
}

func NewDBus

func NewDBus(conn *dbus.Conn) (Client, error)

func NewDBusFrom

func NewDBusFrom(conn *dbus.Conn, err error) (Client, error)

func NewDBusFromDial

func NewDBusFromDial(bus string) (Client, error)

func NewDBusFromSession

func NewDBusFromSession() (Client, error)

func NewDBusFromSystem

func NewDBusFromSystem() (Client, error)

type Command

type Command struct {
	Timeout int `short:"t" long:"timeout" description:"timeout for listing available servers"`
}

func (*Command) ConnectToDBus

func (m *Command) ConnectToDBus(c *cli.Context) (Client, error)

type Command2

type Command2 struct {
	Command
	OutType string `short:"o" long:"output" description:"the output {type} when connecting to a server (none, out, err, both)"`
	Direct  bool   `short:"n" long:"direct" description:"Do not attempt to resolve service names"`
}

func (*Command2) GetOutType

func (m *Command2) GetOutType() common.OutputType

type ServerInfo

type ServerInfo struct {
	Sender      string
	Description string
}

Jump to

Keyboard shortcuts

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