client

package
v0.0.0-...-6487dab Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: MIT Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func DumpOutput

func DumpOutput(source *os.File)

func SendInput

func SendInput(sink *os.File)

Types

type Command

type Command struct {
	OutType string `long:"out-type" description:"the output {type} when connecting to a server (none, out, err, both)"`
	Direct  bool   `short:"n" long:"direct" description:"Use SERVICE as the destination instead of resolving it"`
	Timeout int    `short:"t" long:"timeout" description:"timeout for listing available servers"`
}

func (*Command) GetOutType

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

type DBusClient

type DBusClient struct {
	// contains filtered or unexported fields
}

func ConnectToDBus

func ConnectToDBus(bus string) (*DBusClient, error)

func (*DBusClient) Close

func (c *DBusClient) Close() error

func (*DBusClient) ListServers

func (c *DBusClient) ListServers(timeout int) chan *ServerInfo

func (*DBusClient) RequestCommand

func (c *DBusClient) RequestCommand(dest string, otype common.OutputType, resolve bool, timeout int) (inPipe *os.File, outPipe *os.File, err error)

func (*DBusClient) RequestOutput

func (c *DBusClient) RequestOutput(dest string, otype common.OutputType, resolve bool, timeout int) (outPipe *os.File, err error)

func (*DBusClient) Resolve

func (c *DBusClient) Resolve(dest string, resolve bool, timeout int) (string, error)

func (*DBusClient) SendCommand

func (c *DBusClient) SendCommand(dest string, otype common.OutputType, command string, resolve bool, timeout int) (outPipe *os.File, err error)

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