mobile

package module
v0.0.0-...-7d4678c Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: Apache-2.0 Imports: 39 Imported by: 0

README

mobile

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManageFdLimit

func ManageFdLimit() (changed bool, newLimit uint64, err error)

ManageFdLimit raise the current max file descriptor count of the process based on the IPFS_FD_MAX value

Types

type AddEvent

type AddEvent struct {
	Name  string
	Hash  string `json:",omitempty"`
	Bytes int64  `json:",omitempty"`
	Size  string `json:",omitempty"`
}

type BlockStat

type BlockStat struct {
	Key  string
	Size int
}

type ConnInfo

type ConnInfo struct {
	Addr      string
	Peer      string
	Latency   int64
	Muxer     string
	Direction inet.Direction
	Streams   []StreamInfo
}

type ConnInfos

type ConnInfos struct {
	Peers []ConnInfo
}

type IdOutput

type IdOutput struct {
	ID              string
	PublicKey       string
	Addresses       []string
	AgentVersion    string
	ProtocolVersion string
}

type Listener

type Listener interface {
	Pubsub(Message string, Data []byte)
	Error(Message string)
	Info(Message string)
	Log(Message string)
	Verbose(Message string)
}

type LsInfo

type LsInfo interface {
	LsLink(progress string)
}
type LsLink struct {
	Name, Hash string
	Size       uint64
	Type       unixfs_pb.Data_DataType
	Target     string
}

LsLink contains printable data for a single ipld link in ls output

type Node

type Node struct {
	RepoPath   string
	PublicKey  string
	PrivateKey string
	Running    bool
	Listener   Listener
	API        coreiface.CoreAPI
	Node       *core.IpfsNode
}

func NewNode

func NewNode(listener Listener, repoPath string) *Node

NewNode create the configuration file for a new node

func (*Node) Add

func (n *Node) Add(paths string, offline bool) (string, error)

func (*Node) BlockRm

func (n *Node) BlockRm(paths string) error

func (*Node) BlockStat

func (n *Node) BlockStat(paths string, offline bool) (string, error)

func (*Node) Daemon

func (n *Node) Daemon(pid string, pubsub bool) error

Daemon function wiht parameter to enable pubsub

func (*Node) DhtFindProvs

func (n *Node) DhtFindProvs(mcid string, provider Provider, numProviders int, verbose bool, timeout int32) error

func (*Node) DhtProvide

func (n *Node) DhtProvide(mcid string, rec bool, verbose bool, timeout int32) error

func (*Node) GetReader

func (n *Node) GetReader(paths string, offline bool) (*Reader, error)

func (*Node) GetStream

func (n *Node) GetStream(paths string, stream Stream, offline bool) error

func (*Node) Id

func (n *Node) Id() (string, error)

func (*Node) IdWithTimeout

func (n *Node) IdWithTimeout(pid string, timeout int32) (string, error)

func (*Node) Init

func (n *Node) Init() error

func (*Node) IsConnected

func (n *Node) IsConnected(pid string) (bool, error)

func (*Node) Logs

func (n *Node) Logs() error

func (*Node) Ls

func (n *Node) Ls(paths string, info LsInfo, timeout int32, offline bool) error

func (*Node) ProtectPeer

func (n *Node) ProtectPeer(pid string, tag string) error

func (*Node) PubsubPeers

func (n *Node) PubsubPeers(info PubsubPeer) error

func (*Node) PubsubPeersWithTopic

func (n *Node) PubsubPeersWithTopic(info PubsubPeer, topic string) error

func (*Node) PubsubPub

func (n *Node) PubsubPub(topic string, data []byte) error

func (*Node) PubsubSub

func (n *Node) PubsubSub(topic string, discover bool) error

func (*Node) RepoGC

func (n *Node) RepoGC() error

func (*Node) Rm

func (n *Node) Rm(paths string) error

func (*Node) SwarmConnect

func (n *Node) SwarmConnect(addr string, timeout int32) (bool, error)

func (*Node) SwarmDisconnect

func (n *Node) SwarmDisconnect(addr string) (bool, error)

func (*Node) SwarmPeer

func (n *Node) SwarmPeer(pid string) (string, error)

func (*Node) SwarmPeers

func (n *Node) SwarmPeers() (string, error)

func (*Node) UnProtectPeer

func (n *Node) UnProtectPeer(pid string, tag string) (bool, error)

func (*Node) Version

func (n *Node) Version() (string, error)

type Provider

type Provider interface {
	Pid(Message string)
}

type PubsubPeer

type PubsubPeer interface {
	Peer(peer string)
}

type Reader

type Reader struct {
	File files.File
	Size int64
	Data []byte
	Read int
}

func (*Reader) Close

func (fd *Reader) Close() error

func (*Reader) ReadAt

func (fd *Reader) ReadAt(position int64, size int64) error

func (*Reader) ReadData

func (fd *Reader) ReadData(size int64) error

type RefWriter

type RefWriter struct {
	DAG      ipld.DAGService
	Ctx      context.Context
	Paths    []string
	Unique   bool
	MaxDepth int
	PrintFmt string
	// contains filtered or unexported fields
}

func (*RefWriter) EvalRefs

func (rw *RefWriter) EvalRefs(n ipld.Node, enc cidenc.Encoder) (int, error)

WriteRefs writes refs of the given object to the underlying writer.

type Stream

type Stream interface {
	Write(Data []byte)
	Size(size int64)
	Close() bool
}

type StreamInfo

type StreamInfo struct {
	Protocol string
}

type VersionOutput

type VersionOutput struct {
	Version string
	Commit  string
	System  string
	Golang  string
}

Directories

Path Synopsis
Package core implements the IpfsNode object and related methods.
Package core implements the IpfsNode object and related methods.
coreapi
Package coreapi provides direct access to the core commands in IPFS.
Package coreapi provides direct access to the core commands in IPFS.
thirdparty

Jump to

Keyboard shortcuts

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