hello

package
v1.11.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0, MIT Imports: 21 Imported by: 9

Documentation

Index

Constants

View Source
const ProtocolID = "/fil/hello/1.0.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type HelloMessage added in v0.3.0

type HelloMessage struct {
	HeaviestTipSet       []cid.Cid
	HeaviestTipSetHeight abi.ChainEpoch
	HeaviestTipSetWeight big.Int
	GenesisHash          cid.Cid
}

func (*HelloMessage) MarshalCBOR added in v0.3.0

func (t *HelloMessage) MarshalCBOR(w io.Writer) error

func (*HelloMessage) UnmarshalCBOR added in v0.3.0

func (t *HelloMessage) UnmarshalCBOR(r io.Reader) error

type LatencyMessage added in v0.3.0

type LatencyMessage struct {
	TArrival int64
	TSent    int64
}

func (*LatencyMessage) MarshalCBOR added in v0.3.0

func (t *LatencyMessage) MarshalCBOR(w io.Writer) error

func (*LatencyMessage) UnmarshalCBOR added in v0.3.0

func (t *LatencyMessage) UnmarshalCBOR(r io.Reader) error

type NewStreamFunc

type NewStreamFunc func(context.Context, peer.ID, ...protocol.ID) (inet.Stream, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewHelloService

func NewHelloService(h host.Host, cs *store.ChainStore, syncer *chain.Syncer, pmgr peermgr.MaybePeerMgr) *Service

func (*Service) HandleStream

func (hs *Service) HandleStream(s inet.Stream)

func (*Service) SayHello

func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error

Jump to

Keyboard shortcuts

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