grpc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: AGPL-3.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBootstrapServer

func RegisterBootstrapServer(s *grpc.Server, srv BootstrapServer)

Types

type BootstrapClient

type BootstrapClient interface {
	// Propose adding a node to the network.
	AddNode(ctx context.Context, in *pb.NodeIdentity, opts ...grpc.CallOption) (*pb.Ack, error)
	// Propose removing a node from the network.
	RemoveNode(ctx context.Context, in *pb.NodeIdentity, opts ...grpc.CallOption) (*pb.Ack, error)
	// Accept a proposal to add or remove a network node.
	Accept(ctx context.Context, in *pb.PeerID, opts ...grpc.CallOption) (*pb.Ack, error)
	// Reject a proposal to add or remove a network node.
	Reject(ctx context.Context, in *pb.PeerID, opts ...grpc.CallOption) (*pb.Ack, error)
	// List pending proposals to add or remove a network node.
	List(ctx context.Context, in *pb.Filter, opts ...grpc.CallOption) (Bootstrap_ListClient, error)
	// Complete the network bootstrap phase.
	Complete(ctx context.Context, in *pb.CompleteReq, opts ...grpc.CallOption) (*pb.Ack, error)
}

func NewBootstrapClient

func NewBootstrapClient(cc *grpc.ClientConn) BootstrapClient

type BootstrapServer

type BootstrapServer interface {
	// Propose adding a node to the network.
	AddNode(context.Context, *pb.NodeIdentity) (*pb.Ack, error)
	// Propose removing a node from the network.
	RemoveNode(context.Context, *pb.NodeIdentity) (*pb.Ack, error)
	// Accept a proposal to add or remove a network node.
	Accept(context.Context, *pb.PeerID) (*pb.Ack, error)
	// Reject a proposal to add or remove a network node.
	Reject(context.Context, *pb.PeerID) (*pb.Ack, error)
	// List pending proposals to add or remove a network node.
	List(*pb.Filter, Bootstrap_ListServer) error
	// Complete the network bootstrap phase.
	Complete(context.Context, *pb.CompleteReq) (*pb.Ack, error)
}

type Bootstrap_ListClient

type Bootstrap_ListClient interface {
	Recv() (*pb.UpdateProposal, error)
	grpc.ClientStream
}

type Bootstrap_ListServer

type Bootstrap_ListServer interface {
	Send(*pb.UpdateProposal) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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