Documentation
¶
Overview ¶
P2P client/server system for bitmarkd
This used RPC to send message to connected peers using the bilateralrpc module.
Index ¶
- func ConnectTo(publicKey string, address string) error
- func ConnectionCount() int
- func Finalise() error
- func Initialise(addresses []string, networkName string, publicKey string, privateKey string) error
- type Asset
- type AssetGetArguments
- type AssetGetReply
- type Block
- type BlockGetArguments
- type BlockGetReply
- type BlockGetResult
- type BlockNumberArguments
- type BlockNumberReply
- type BlockNumberResult
- type BlockPair
- type BlockPutArguments
- type BlockPutReply
- type ByBlockNumber
- type Certificate
- type GetCertificateArguments
- type GetCertificateReply
- type NeighbourArguments
- type NeighbourReply
- type Peer
- type PeerArguments
- type PeerReply
- type PutCertificateArguments
- type PutCertificateReply
- type RPCs
- type RpcListArguments
- type RpcListReply
- type RpcPutArguments
- type RpcPutReply
- type Transaction
- type TransactionGetArguments
- type TransactionGetReply
- type TransactionGetResult
- type TransactionPutArguments
- type TransactionPutReply
- type TransactionPutResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Asset ¶
type Asset struct {
// contains filtered or unexported fields
}
func (*Asset) Get ¶
func (t *Asset) Get(arguments *AssetGetArguments, reply *AssetGetReply) error
read a specific asset
type AssetGetArguments ¶
type AssetGetArguments struct {
AssetIndex transaction.AssetIndex
}
type AssetGetReply ¶
type AssetGetReply struct { Digest transaction.Link AssetIndex transaction.AssetIndex Data []byte }
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func (*Block) Get ¶
func (t *Block) Get(arguments *BlockGetArguments, reply *BlockGetReply) error
read a specific block
func (*Block) Number ¶
func (t *Block) Number(arguments *BlockNumberArguments, reply *BlockNumberReply) error
fetch the highest block number available
func (*Block) Put ¶
func (t *Block) Put(arguments *BlockPutArguments, reply *BlockPutReply) error
new incoming block
type BlockGetArguments ¶
type BlockGetArguments struct {
Number uint64
}
type BlockGetReply ¶
type BlockGetReply struct {
Data []byte
}
type BlockGetResult ¶
type BlockGetResult struct { From string Reply BlockGetReply Err error }
type BlockNumberArguments ¶
type BlockNumberArguments struct { }
type BlockNumberReply ¶
type BlockNumberReply struct {
Number uint64
}
type BlockNumberResult ¶
type BlockNumberResult struct { From string Reply BlockNumberReply Err error }
type for returned block numbers
type BlockPair ¶
type BlockPair struct {
// contains filtered or unexported fields
}
type to hold the broadcast block
type BlockPutArguments ¶
type BlockPutReply ¶
type BlockPutReply struct {
Duplicate bool
}
type ByBlockNumber ¶
type ByBlockNumber []BlockNumberResult
ByBlockNumber implements sort.Interface for []BlockNumberReply based on the Reply.Number field.
func (ByBlockNumber) Len ¶
func (a ByBlockNumber) Len() int
sort interface Note: need '>' to get highest block first
func (ByBlockNumber) Less ¶
func (a ByBlockNumber) Less(i, j int) bool
func (ByBlockNumber) Swap ¶
func (a ByBlockNumber) Swap(i, j int)
type Certificate ¶
type Certificate struct {
// contains filtered or unexported fields
}
type to hold Certificate
func (*Certificate) Get ¶
func (t *Certificate) Get(arguments *GetCertificateArguments, reply *GetCertificateReply) error
func (*Certificate) Put ¶
func (t *Certificate) Put(arguments *PutCertificateArguments, reply *PutCertificateReply) error
type GetCertificateArguments ¶
type GetCertificateArguments struct {
Fingerprint util.FingerprintBytes
}
type GetCertificateReply ¶
type GetCertificateReply struct {
Certificate []byte
}
type NeighbourArguments ¶
type NeighbourReply ¶
type NeighbourReply struct { Peers []announce.RecentData NextStart *gnomon.Cursor }
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
type to hold Peer
func (*Peer) List ¶
func (t *Peer) List(arguments *NeighbourArguments, reply *NeighbourReply) error
func (*Peer) RPCs ¶
func (t *Peer) RPCs(arguments *NeighbourArguments, reply *NeighbourReply) error
type PeerArguments ¶
type PeerArguments struct { Address string Fingerprint util.FingerprintBytes }
type PutCertificateArguments ¶
type PutCertificateArguments struct {
Certificate []byte
}
type PutCertificateReply ¶
type PutCertificateReply struct { }
type RPCs ¶
type RPCs struct {
// contains filtered or unexported fields
}
type to hold RPCs
func (*RPCs) List ¶
func (t *RPCs) List(arguments *RpcListArguments, reply *RpcListReply) error
func (*RPCs) Put ¶
func (t *RPCs) Put(arguments *RpcPutArguments, reply *RpcPutReply) error
type RpcListArguments ¶
type RpcListReply ¶
type RpcListReply struct { Peers []announce.RecentData NextStart *gnomon.Cursor }
type RpcPutArguments ¶
type RpcPutArguments struct { Address string Fingerprint util.FingerprintBytes }
type RpcPutReply ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Get ¶
func (t *Transaction) Get(arguments *TransactionGetArguments, reply *TransactionGetReply) error
read a specific transaction
func (*Transaction) Put ¶
func (t *Transaction) Put(arguments *TransactionPutArguments, reply *TransactionPutReply) error
new incoming transaction
type TransactionGetArguments ¶
type TransactionGetArguments struct {
TxId transaction.Link
}
type TransactionGetReply ¶
type TransactionGetReply struct { State transaction.State Data []byte }
type TransactionGetResult ¶
type TransactionGetResult struct { From string Reply TransactionGetReply Err error }
for getting transactions
type TransactionPutArguments ¶
type TransactionPutArguments struct { Bilateral_SENDER string // magick field Tx transaction.Packed }
type TransactionPutReply ¶
type TransactionPutReply struct {
Duplicate bool
}
type TransactionPutResult ¶
type TransactionPutResult struct { From string Reply TransactionPutReply Err error }
for putting transactions
Click to show internal directories.
Click to hide internal directories.