Versions in this module Expand all Collapse all v0 v0.4.0 Jan 18, 2019 Changes in this version + func SwarmKey() (string, error) + type Client struct + func (c *Client) CreateNode(ctx context.Context, n *NodeInfo, opts NodeOpts) error + func (c *Client) NodeStats(ctx context.Context, n *NodeInfo) (NodeStats, error) + func (c *Client) Nodes(ctx context.Context) ([]*NodeInfo, error) + func (c *Client) RemoveNode(ctx context.Context, network string) error + func (c *Client) StopNode(ctx context.Context, n *NodeInfo) error + func (c *Client) UpdateNode(ctx context.Context, n *NodeInfo) error + func (c *Client) Watch(ctx context.Context) (<-chan Event, <-chan error) + type Event struct + Node NodeInfo + Status string + Time int64 + type GoIPFSConfig struct + Identity struct{ ... } + type NodeClient interface + CreateNode func(ctx context.Context, n *NodeInfo, opts NodeOpts) (err error) + NodeStats func(ctx context.Context, n *NodeInfo) (stats NodeStats, err error) + Nodes func(ctx context.Context) (nodes []*NodeInfo, err error) + RemoveNode func(ctx context.Context, network string) (err error) + StopNode func(ctx context.Context, n *NodeInfo) (err error) + UpdateNode func(ctx context.Context, n *NodeInfo) (err error) + Watch func(ctx context.Context) (<-chan Event, <-chan error) + func NewClient(logger *zap.SugaredLogger, ipfsOpts config.IPFS) (NodeClient, error) + type NodeInfo struct + BootstrapPeers []string + ContainerName string + DataDir string + DockerID string + JobID string + NetworkID string + Ports NodePorts + Resources NodeResources + type NodeOpts struct + AutoRemove bool + SwarmKey []byte + type NodePorts struct + API string + Gateway string + Swarm string + type NodeResources struct + CPUs int + DiskGB int + MemoryGB int + type NodeStats struct + DiskUsage int64 + PeerID string + PeerKey string + Stats interface{} + Uptime time.Duration