Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalClient ¶
type ExternalClient struct { transpb.CommandServiceClient *grpc.ClientConn }
func NewExternalClient ¶
func NewExternalClient(ctx context.Context, addr string) (*ExternalClient, error)
type MessageHandler ¶
type MessageHandler interface { HandleMessage(*transportpb.TransMsg) HandleCommand(context.Context, *transportpb.ClientPacket) (*transportpb.ClientPacket, error) }
MessageHandler is an object capable of accepting incoming protocol messages.
type Request ¶
type Request struct { Command *commandpb.Command ReturnC chan<- commandpb.CommandResult }
type Transport ¶
type Transport interface { Init(id peerpb.PeerID, addr string, peers map[peerpb.PeerID]string) Serve(MessageHandler) Send(msgs []peerpb.Message) Close() }
Transport handles RPC messages for Raft coordination.
func NewGRPCTransport ¶
func NewGRPCTransport() Transport
NewGRPCTransport creates a new Transport that uses gRPC streams.
Click to show internal directories.
Click to hide internal directories.