Documentation ¶
Overview ¶
Package testnetwork provides an in-memory implementation of rpc.Network for testing purposes.
Index ¶
- Constants
- func RegisterSchema(reg *schemas.Registry)
- type Joiner
- type PeerAndNonce
- func (PeerAndNonce) DecodeFromPtr(p capnp.Ptr) PeerAndNonce
- func (s PeerAndNonce) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
- func (s PeerAndNonce) IsValid() bool
- func (s PeerAndNonce) Message() *capnp.Message
- func (s PeerAndNonce) Nonce() uint64
- func (s PeerAndNonce) PeerId() uint64
- func (s PeerAndNonce) Segment() *capnp.Segment
- func (s PeerAndNonce) SetNonce(v uint64)
- func (s PeerAndNonce) SetPeerId(v uint64)
- func (s PeerAndNonce) String() string
- func (s PeerAndNonce) ToPtr() capnp.Ptr
- type PeerAndNonce_Future
- type PeerAndNonce_List
- type PeerID
Constants ¶
View Source
const PeerAndNonce_TypeID = 0x9fae1e732359c0b5
PeerAndNonce_TypeID is the unique identifier for the type PeerAndNonce.
Variables ¶
This section is empty.
Functions ¶
func RegisterSchema ¶
Types ¶
type Joiner ¶
type Joiner struct {
// contains filtered or unexported fields
}
A Joiner is a global view of a test network, which can be joined by a peer to acquire a Network.
type PeerAndNonce ¶
func NewPeerAndNonce ¶
func NewPeerAndNonce(s *capnp.Segment) (PeerAndNonce, error)
func NewRootPeerAndNonce ¶
func NewRootPeerAndNonce(s *capnp.Segment) (PeerAndNonce, error)
func ReadRootPeerAndNonce ¶
func ReadRootPeerAndNonce(msg *capnp.Message) (PeerAndNonce, error)
func (PeerAndNonce) DecodeFromPtr ¶
func (PeerAndNonce) DecodeFromPtr(p capnp.Ptr) PeerAndNonce
func (PeerAndNonce) EncodeAsPtr ¶
func (s PeerAndNonce) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr
func (PeerAndNonce) IsValid ¶
func (s PeerAndNonce) IsValid() bool
func (PeerAndNonce) Message ¶
func (s PeerAndNonce) Message() *capnp.Message
func (PeerAndNonce) Nonce ¶
func (s PeerAndNonce) Nonce() uint64
func (PeerAndNonce) PeerId ¶
func (s PeerAndNonce) PeerId() uint64
func (PeerAndNonce) Segment ¶
func (s PeerAndNonce) Segment() *capnp.Segment
func (PeerAndNonce) SetNonce ¶
func (s PeerAndNonce) SetNonce(v uint64)
func (PeerAndNonce) SetPeerId ¶
func (s PeerAndNonce) SetPeerId(v uint64)
func (PeerAndNonce) String ¶
func (s PeerAndNonce) String() string
func (PeerAndNonce) ToPtr ¶
func (s PeerAndNonce) ToPtr() capnp.Ptr
type PeerAndNonce_Future ¶
PeerAndNonce_Future is a wrapper for a PeerAndNonce promised by a client call.
func (PeerAndNonce_Future) Struct ¶
func (f PeerAndNonce_Future) Struct() (PeerAndNonce, error)
type PeerAndNonce_List ¶
type PeerAndNonce_List = capnp.StructList[PeerAndNonce]
PeerAndNonce_List is a list of PeerAndNonce.
func NewPeerAndNonce_List ¶
func NewPeerAndNonce_List(s *capnp.Segment, sz int32) (PeerAndNonce_List, error)
NewPeerAndNonce creates a new list of PeerAndNonce.
Click to show internal directories.
Click to hide internal directories.