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
}
Click to show internal directories.
Click to hide internal directories.