daemon

package
v0.0.0-...-c9e5fdf Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2014 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const LockFile = "daemon.lock"

LockFile is the filename of the daemon lock, relative to config dir

Variables

View Source
var ErrDaemonNotRunning = errors.New("daemon not running")

ErrDaemonNotRunning is returned when attempting to retrieve the daemon's address and the daemon is not actually running.

Functions

func SendCommand

func SendCommand(command *Command, confdir string) error

SendCommand attempts to run the command over a currently-running daemon. If there is no running daemon, returns ErrDaemonNotRunning. This is done over network RPC API. The address of the daemon is retrieved from the config directory, where live daemons write their addresses to special files.

Types

type Command

type Command struct {
	Command string
	Args    []string
	Opts    map[string]interface{}
}

Command accepts user input and can be sent to the running IPFS node

func NewCommand

func NewCommand() *Command

type DaemonListener

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

DaemonListener listens to an initialized IPFS node and can send it commands instead of starting up a new set of connections

func NewDaemonListener

func NewDaemonListener(ipfsnode *core.IpfsNode, addr ma.Multiaddr, confdir string) (*DaemonListener, error)

func (*DaemonListener) Close

func (dl *DaemonListener) Close() error

func (*DaemonListener) Listen

func (dl *DaemonListener) Listen()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳