message

package
v0.0.0-...-bebc87d Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package bitswap is a generated protocol buffer package.

It is generated from these files:

message.proto

It has these top-level messages:

PBMessage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *message

Types

type BitSwapMessage

type BitSwapMessage interface {
	Wantlist() []u.Key
	Blocks() []blocks.Block
	AppendWanted(k u.Key)
	AppendBlock(b blocks.Block)
	Exportable
}

func FromNet

func FromNet(nmsg netmsg.NetMessage) (BitSwapMessage, error)

type Exportable

type Exportable interface {
	ToProto() *PBMessage
	ToNet(p *peer.Peer) (nm.NetMessage, error)
}

type PBMessage

type PBMessage struct {
	Wantlist         []string `protobuf:"bytes,1,rep,name=wantlist" json:"wantlist,omitempty"`
	Blocks           [][]byte `protobuf:"bytes,2,rep,name=blocks" json:"blocks,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*PBMessage) GetBlocks

func (m *PBMessage) GetBlocks() [][]byte

func (*PBMessage) GetWantlist

func (m *PBMessage) GetWantlist() []string

func (*PBMessage) ProtoMessage

func (*PBMessage) ProtoMessage()

func (*PBMessage) Reset

func (m *PBMessage) Reset()

func (*PBMessage) String

func (m *PBMessage) String() string

Jump to

Keyboard shortcuts

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