kadcast

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 20 Imported by: 0

README

Kadcast Peer

p2p/kadcast package provides an embedded gRPC interface that allows the Node to communicate with the actual Kadcast Peer that lives within Rusk and exposes a gRPC server for bidirectional communication.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNetworkClient added in v0.6.0

func CreateNetworkClient(ctx context.Context, network, address string, dialTimeout int) (rusk.NetworkClient, *grpc.ClientConn)

CreateNetworkClient creates a client for the Kadcast network layer.

func InjectRuskVersion added in v0.6.0

func InjectRuskVersion(ctx context.Context) context.Context

InjectRuskVersion injects the rusk version into the grpc headers.

Types

type Peer

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

Peer is a wrapper for both kadcast grpc sides.

func NewKadcastPeer added in v0.4.4

func NewKadcastPeer(pCtx context.Context, eventBus *eventbus.EventBus, processor *peer.MessageProcessor, gossip *protocol.Gossip) *Peer

NewKadcastPeer returns a new kadcast (gRPC interface) peer instance.

func (*Peer) Close added in v0.4.0

func (p *Peer) Close()

Close terminates kadcast peer instance.

func (*Peer) Launch added in v0.4.0

func (p *Peer) Launch()

Launch starts kadcast peer reader and writers, binds them to the event buss, and establishes connection to rusk network server.

type Reader added in v0.4.0

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

Reader is a proxy between Kadcast grpc service and Message Processor. It receives a wire message and ,if it's valid, redirects it to Message Processor. In addition, it turns any response message from Processor into topics.KadcastPoint EventBus message.

func NewReader added in v0.4.0

NewReader makes a new Kadcast reader.

func (*Reader) Listen added in v0.4.4

func (r *Reader) Listen()

Listen starts accepting and processing stream data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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