Documentation ¶
Index ¶
- Constants
- Variables
- func Disconnect(publicKey string) error
- func UploadDag(ctx context.Context, dag *merkle_dag.Dag, publicKey *string, signature *string) (context.Context, error)
- func UploadLeafChildren(ctx context.Context, stream network.Stream, leaf *merkle_dag.DagLeaf, ...) error
- func WaitForResponse(ctx context.Context, stream network.Stream) bool
- func WaitForUploadMessage(ctx context.Context, stream network.Stream) (bool, *lib.UploadMessage)
- func WriteResponseToStream(ctx context.Context, stream network.Stream, response bool) error
- type Client
- func (client *Client) Disconnect() error
- func (client *Client) DownloadDag(ctx context.Context, root string, publicKey *string, signature *string) (context.Context, *merkle_dag.Dag, error)
- func (client *Client) UploadDag(ctx context.Context, dag *merkle_dag.Dag, publicKey *string, signature *string) (context.Context, error)
Constants ¶
Variables ¶
View Source
var Clients map[string]*Client
Functions ¶
func Disconnect ¶
func UploadDag ¶
func UploadDag(ctx context.Context, dag *merkle_dag.Dag, publicKey *string, signature *string) (context.Context, error)
Upload dag to all connected hornet nodes
func UploadLeafChildren ¶
func UploadLeafChildren(ctx context.Context, stream network.Stream, leaf *merkle_dag.DagLeaf, dag *merkle_dag.Dag) error
func WaitForUploadMessage ¶
Types ¶
type Client ¶
type Client struct { Host *host.Host ServerAddress *multiaddr.Multiaddr Peer *peer.AddrInfo // contains filtered or unexported fields }
func (*Client) Disconnect ¶
Click to show internal directories.
Click to hide internal directories.