channetwork

package
v0.0.0-...-5a6e01e Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package channetwork provides the golang channel based network.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	*logging.Logging
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(bufsize uint, connInfo network.ConnInfo) *Channel

func (*Channel) Blockdata

func (ch *Channel) Blockdata(_ context.Context, item block.BlockdataMapItem) (io.ReadCloser, error)

func (*Channel) BlockdataMaps

func (ch *Channel) BlockdataMaps(_ context.Context, hs []base.Height) ([]block.BlockdataMap, error)

func (*Channel) ConnInfo

func (ch *Channel) ConnInfo() network.ConnInfo

func (*Channel) EndHandover

func (ch *Channel) EndHandover(_ context.Context, sl network.EndHandoverSeal) (bool, error)

func (*Channel) Initialize

func (*Channel) Initialize() error

func (*Channel) NodeInfo

func (ch *Channel) NodeInfo(_ context.Context) (network.NodeInfo, error)

func (*Channel) PingHandover

func (ch *Channel) PingHandover(_ context.Context, sl network.PingHandoverSeal) (bool, error)

func (*Channel) Proposal

func (ch *Channel) Proposal(_ context.Context, h valuehash.Hash) (base.Proposal, error)

func (*Channel) ReceiveSeal

func (ch *Channel) ReceiveSeal() <-chan network.PassthroughedSeal

func (*Channel) SendSeal

func (ch *Channel) SendSeal(_ context.Context, ci network.ConnInfo, sl seal.Seal) error

func (*Channel) SetBlockdataHandler

func (ch *Channel) SetBlockdataHandler(f network.BlockdataHandler)

func (*Channel) SetBlockdataMapsHandler

func (ch *Channel) SetBlockdataMapsHandler(f network.BlockdataMapsHandler)

func (*Channel) SetEndHandover

func (ch *Channel) SetEndHandover(f network.EndHandoverHandler)

func (*Channel) SetGetProposalHandler

func (ch *Channel) SetGetProposalHandler(f network.GetProposalHandler)

func (*Channel) SetGetStagedOperationsHandler

func (ch *Channel) SetGetStagedOperationsHandler(f network.GetStagedOperationsHandler)

func (*Channel) SetNodeInfoHandler

func (ch *Channel) SetNodeInfoHandler(f network.NodeInfoHandler)

func (*Channel) SetPingHandover

func (ch *Channel) SetPingHandover(f network.PingHandoverHandler)

func (*Channel) SetStartHandover

func (ch *Channel) SetStartHandover(f network.StartHandoverHandler)

func (*Channel) StagedOperations

func (ch *Channel) StagedOperations(_ context.Context, h []valuehash.Hash) ([]operation.Operation, error)

func (*Channel) StartHandover

func (ch *Channel) StartHandover(_ context.Context, sl network.StartHandoverSeal) (bool, error)

func (*Channel) State

func (ch *Channel) State(_ context.Context, key string) (state.State, bool, error)

type Server

type Server struct {
	*logging.Logging
	*util.ContextDaemon
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	ch *Channel,
	passthroughs func(context.Context, network.PassthroughedSeal, func(seal.Seal, network.Channel)) error,
) *Server

func (*Server) Initialize

func (*Server) Initialize() error

func (*Server) NodeInfoHandler

func (*Server) NodeInfoHandler() network.NodeInfoHandler

func (*Server) SetBlockdataHandler

func (*Server) SetBlockdataHandler(network.BlockdataHandler)

func (*Server) SetBlockdataMapsHandler

func (*Server) SetBlockdataMapsHandler(network.BlockdataMapsHandler)

func (*Server) SetEndHandoverHandler

func (*Server) SetEndHandoverHandler(network.EndHandoverHandler)

func (*Server) SetGetProposalHandler

func (*Server) SetGetProposalHandler(network.GetProposalHandler)

func (*Server) SetGetStagedOperationsHandler

func (*Server) SetGetStagedOperationsHandler(network.GetStagedOperationsHandler)

func (*Server) SetLogging

func (sv *Server) SetLogging(l *logging.Logging) *logging.Logging

func (*Server) SetNewSealHandler

func (sv *Server) SetNewSealHandler(f network.NewSealHandler)

func (*Server) SetNodeInfoHandler

func (*Server) SetNodeInfoHandler(network.NodeInfoHandler)

func (*Server) SetPingHandoverHandler

func (*Server) SetPingHandoverHandler(network.PingHandoverHandler)

func (*Server) SetStartHandoverHandler

func (*Server) SetStartHandoverHandler(network.StartHandoverHandler)

Jump to

Keyboard shortcuts

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