Documentation
¶
Index ¶
- Constants
- Variables
- func Equal(a, b *Configuration) bool
- func ManagerCreationError(err error) error
- func RegisterZorumsServiceServer(s *grpc.Server, srv ZorumsServiceServer)
- type ConfigNotFoundError
- type Configuration
- func (c *Configuration) Correctable(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableResponse
- func (c *Configuration) CorrectableCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request, ...) *CorrectableMyResponse
- func (c *Configuration) CorrectableCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableMyResponse
- func (c *Configuration) CorrectableEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableEmpty
- func (c *Configuration) CorrectableEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) *CorrectableResponse
- func (c *Configuration) CorrectablePerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request, ...) *CorrectableResponse
- func (c *Configuration) CorrectableStream(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableStreamResponse
- func (c *Configuration) CorrectableStreamCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request, ...) *CorrectableStreamMyResponse
- func (c *Configuration) CorrectableStreamCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableStreamMyResponse
- func (c *Configuration) CorrectableStreamEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableStreamEmpty
- func (c *Configuration) CorrectableStreamEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) *CorrectableStreamResponse
- func (c *Configuration) CorrectableStreamPerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request, ...) *CorrectableStreamResponse
- func (c *Configuration) ID() uint32
- func (c *Configuration) Multicast(in *Request) error
- func (c *Configuration) Multicast2(in *Request) error
- func (c *Configuration) Multicast3(in *Request) error
- func (c *Configuration) Multicast4(in *empty.Empty) error
- func (c *Configuration) MulticastPerNodeArg(in *Request, f func(*Request, uint32) *Request) error
- func (c *Configuration) NodeIDs() []uint32
- func (c *Configuration) Nodes() []*Node
- func (c *Configuration) OrderingCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request) (resp *MyResponse, err error)
- func (c *Configuration) OrderingCustomReturnType(ctx context.Context, in *Request) (resp *MyResponse, err error)
- func (c *Configuration) OrderingFuture(ctx context.Context, in *Request) *FutureResponse
- func (c *Configuration) OrderingFutureCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request) *FutureMyResponse
- func (c *Configuration) OrderingFutureCustomReturnType(ctx context.Context, in *Request) *FutureMyResponse
- func (c *Configuration) OrderingFuturePerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request) *FutureResponse
- func (c *Configuration) OrderingPerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request) (resp *Response, err error)
- func (c *Configuration) OrderingQC(ctx context.Context, in *Request) (resp *Response, err error)
- func (c *Configuration) QuorumCall(ctx context.Context, in *Request, opts ...grpc.CallOption) (resp *Response, err error)
- func (c *Configuration) QuorumCallCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request, ...) (resp *MyResponse, err error)
- func (c *Configuration) QuorumCallCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) (resp *MyResponse, err error)
- func (c *Configuration) QuorumCallEmpty(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (resp *Response, err error)
- func (c *Configuration) QuorumCallEmpty2(ctx context.Context, in *Request, opts ...grpc.CallOption) (resp *empty.Empty, err error)
- func (c *Configuration) QuorumCallFuture(ctx context.Context, in *Request, opts ...grpc.CallOption) *FutureResponse
- func (c *Configuration) QuorumCallFuture2(ctx context.Context, in *Request, opts ...grpc.CallOption) *FutureResponse
- func (c *Configuration) QuorumCallFutureCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request, ...) *FutureMyResponse
- func (c *Configuration) QuorumCallFutureCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) *FutureMyResponse
- func (c *Configuration) QuorumCallFutureEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) *FutureEmpty
- func (c *Configuration) QuorumCallFutureEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) *FutureResponse
- func (c *Configuration) QuorumCallFuturePerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request, ...) *FutureResponse
- func (c *Configuration) QuorumCallPerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request, ...) (resp *Response, err error)
- func (c *Configuration) Size() int
- func (c *Configuration) String() string
- func (c *Configuration) SubError() <-chan GRPCError
- type CorrectableEmpty
- type CorrectableMyResponse
- type CorrectableResponse
- type CorrectableStreamEmpty
- type CorrectableStreamMyResponse
- type CorrectableStreamResponse
- type FutureEmpty
- type FutureMyResponse
- type FutureResponse
- type GRPCError
- type GorumsServer
- type IllegalConfigError
- type Manager
- func (m *Manager) AddNode(addr string) error
- func (m *Manager) Close()
- func (m *Manager) Configuration(id uint32) (config *Configuration, found bool)
- func (m *Manager) ConfigurationIDs() []uint32
- func (m *Manager) Configurations() []*Configuration
- func (m *Manager) NewConfiguration(ids []uint32, qspec QuorumSpec) (*Configuration, error)
- func (m *Manager) Node(id uint32) (node *Node, found bool)
- func (m *Manager) NodeIDs() []uint32
- func (m *Manager) Nodes() []*Node
- func (m *Manager) Size() (nodes, configs int)
- type ManagerOption
- func WithBackoff(backoff backoff.Config) ManagerOption
- func WithDialTimeout(timeout time.Duration) ManagerOption
- func WithGrpcDialOptions(opts ...grpc.DialOption) ManagerOption
- func WithLogger(logger *log.Logger) ManagerOption
- func WithMetadata(md metadata.MD) ManagerOption
- func WithNoConnect() ManagerOption
- func WithNodeList(addrsList []string) ManagerOption
- func WithNodeMap(idMap map[string]uint32) ManagerOption
- func WithPerNodeMetadata(f func(uint32) metadata.MD) ManagerOption
- func WithSendBufferSize(size uint) ManagerOption
- func WithTracing() ManagerOption
- type MultiSorter
- type MyResponse
- type Node
- func (n *Node) Address() string
- func (n *Node) Correctable(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) CorrectableCombo(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) CorrectableCustomReturnType(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) CorrectableEmpty(ctx context.Context, in *Request, replyChan chan<- internalEmpty)
- func (n *Node) CorrectableEmpty2(ctx context.Context, in *empty.Empty, replyChan chan<- internalResponse)
- func (n *Node) CorrectablePerNodeArg(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) CorrectableStream(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) CorrectableStreamCombo(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) CorrectableStreamCustomReturnType(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) CorrectableStreamEmpty(ctx context.Context, in *Request, replyChan chan<- internalEmpty)
- func (n *Node) CorrectableStreamEmpty2(ctx context.Context, in *empty.Empty, replyChan chan<- internalResponse)
- func (n *Node) CorrectableStreamPerNodeArg(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) FullString() string
- func (n *Node) ID() uint32
- func (n *Node) LastErr() error
- func (n *Node) Latency() time.Duration
- func (n *Node) OrderingUnaryRPC(ctx context.Context, in *Request, opts ...grpc.CallOption) (resp *Response, err error)
- func (n *Node) Port() string
- func (n *Node) QuorumCall(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallCombo(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallCustomReturnType(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallEmpty(ctx context.Context, in *empty.Empty, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallEmpty2(ctx context.Context, in *Request, replyChan chan<- internalEmpty)
- func (n *Node) QuorumCallFuture(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallFuture2(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallFutureCombo(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallFutureCustomReturnType(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallFutureEmpty(ctx context.Context, in *Request, replyChan chan<- internalEmpty)
- func (n *Node) QuorumCallFutureEmpty2(ctx context.Context, in *empty.Empty, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallFuturePerNodeArg(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) QuorumCallPerNodeArg(ctx context.Context, in *Request, replyChan chan<- internalResponse)
- func (n *Node) String() string
- func (n *Node) Unicast(in *Request) error
- func (n *Node) Unicast2(in *Request) error
- type NodeNotFoundError
- type QuorumCallError
- type QuorumSpec
- type Request
- type Response
- type ServerOption
- type UnimplementedZorumsServiceServer
- func (*UnimplementedZorumsServiceServer) Correctable(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) CorrectableCombo(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) CorrectableCustomReturnType(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) CorrectableEmpty(context.Context, *Request) (*empty.Empty, error)
- func (*UnimplementedZorumsServiceServer) CorrectableEmpty2(context.Context, *empty.Empty) (*Response, error)
- func (*UnimplementedZorumsServiceServer) CorrectablePerNodeArg(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) CorrectableStream(*Request, ZorumsService_CorrectableStreamServer) error
- func (*UnimplementedZorumsServiceServer) CorrectableStreamCombo(*Request, ZorumsService_CorrectableStreamComboServer) error
- func (*UnimplementedZorumsServiceServer) CorrectableStreamCustomReturnType(*Request, ZorumsService_CorrectableStreamCustomReturnTypeServer) error
- func (*UnimplementedZorumsServiceServer) CorrectableStreamEmpty(*Request, ZorumsService_CorrectableStreamEmptyServer) error
- func (*UnimplementedZorumsServiceServer) CorrectableStreamEmpty2(*empty.Empty, ZorumsService_CorrectableStreamEmpty2Server) error
- func (*UnimplementedZorumsServiceServer) CorrectableStreamPerNodeArg(*Request, ZorumsService_CorrectableStreamPerNodeArgServer) error
- func (*UnimplementedZorumsServiceServer) GRPCCall(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) Multicast(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) Multicast2(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) Multicast3(context.Context, *Request) (*empty.Empty, error)
- func (*UnimplementedZorumsServiceServer) Multicast4(context.Context, *empty.Empty) (*empty.Empty, error)
- func (*UnimplementedZorumsServiceServer) MulticastPerNodeArg(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingCombo(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingCustomReturnType(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingFuture(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingFutureCombo(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingFutureCustomReturnType(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingFuturePerNodeArg(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingPerNodeArg(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingQC(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) OrderingUnaryRPC(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCall(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallCombo(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallCustomReturnType(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallEmpty(context.Context, *empty.Empty) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallEmpty2(context.Context, *Request) (*empty.Empty, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallFuture(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallFuture2(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallFutureCombo(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallFutureCustomReturnType(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallFutureEmpty(context.Context, *Request) (*empty.Empty, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallFutureEmpty2(context.Context, *empty.Empty) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallFuturePerNodeArg(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) QuorumCallPerNodeArg(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) Unicast(context.Context, *Request) (*Response, error)
- func (*UnimplementedZorumsServiceServer) Unicast2(context.Context, *Request) (*empty.Empty, error)
- type ZorumsService
- type ZorumsServiceClient
- type ZorumsServiceServer
- type ZorumsService_CorrectableStreamClient
- type ZorumsService_CorrectableStreamComboClient
- type ZorumsService_CorrectableStreamComboServer
- type ZorumsService_CorrectableStreamCustomReturnTypeClient
- type ZorumsService_CorrectableStreamCustomReturnTypeServer
- type ZorumsService_CorrectableStreamEmpty2Client
- type ZorumsService_CorrectableStreamEmpty2Server
- type ZorumsService_CorrectableStreamEmptyClient
- type ZorumsService_CorrectableStreamEmptyServer
- type ZorumsService_CorrectableStreamPerNodeArgClient
- type ZorumsService_CorrectableStreamPerNodeArgServer
- type ZorumsService_CorrectableStreamServer
Constants ¶
const LevelNotSet = -1
LevelNotSet is the zero value level used to indicate that no level (and thereby no reply) has been set for a correctable quorum call.
Variables ¶
var Error = func(n1, n2 *Node) bool { if n1.lastErr != nil && n2.lastErr == nil { return false } return true }
Error sorts nodes by their LastErr() status in increasing order. A node with LastErr() != nil is larger than a node with LastErr() == nil.
var File_zorums_proto protoreflect.FileDescriptor
var ID = func(n1, n2 *Node) bool {
return n1.id < n2.id
}
ID sorts nodes by their identifier in increasing order.
var Latency = func(n1, n2 *Node) bool { if n1.latency < 0 { return false } return n1.latency < n2.latency }
Latency sorts nodes by latency in increasing order. Latencies less then zero (sentinel value) are considered greater than any positive latency.
var Port = func(n1, n2 *Node) bool { p1, _ := strconv.Atoi(n1.Port()) p2, _ := strconv.Atoi(n2.Port()) return p1 < p2 }
Port sorts nodes by their port number in increasing order. Warning: This function may be removed in the future.
Functions ¶
func Equal ¶
func Equal(a, b *Configuration) bool
Equal returns a boolean reporting whether a and b represents the same configuration.
func ManagerCreationError ¶
ManagerCreationError returns an error reporting that a Manager could not be created due to err.
func RegisterZorumsServiceServer ¶
func RegisterZorumsServiceServer(s *grpc.Server, srv ZorumsServiceServer)
Types ¶
type ConfigNotFoundError ¶
type ConfigNotFoundError uint32
A ConfigNotFoundError reports that a specified configuration could not be found.
func (ConfigNotFoundError) Error ¶
func (e ConfigNotFoundError) Error() string
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
A Configuration represents a static set of nodes on which quorum remote procedure calls may be invoked.
func NewConfig ¶
func NewConfig(qspec QuorumSpec, opts ...ManagerOption) (*Configuration, func(), error)
NewConfig returns a configuration for the given node addresses and quorum spec. The returned func() must be called to close the underlying connections. This is an experimental API.
func (*Configuration) Correctable ¶
func (c *Configuration) Correctable(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableResponse
Correctable plain.
func (*Configuration) CorrectableCombo ¶
func (c *Configuration) CorrectableCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request, opts ...grpc.CallOption) *CorrectableMyResponse
CorrectableCombo with all supported options.
func (*Configuration) CorrectableCustomReturnType ¶
func (c *Configuration) CorrectableCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableMyResponse
CorrectableCustomReturnType with custom_return_type option.
func (*Configuration) CorrectableEmpty ¶
func (c *Configuration) CorrectableEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableEmpty
CorrectableEmpty for testing imported message type.
func (*Configuration) CorrectableEmpty2 ¶
func (c *Configuration) CorrectableEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) *CorrectableResponse
CorrectableEmpty2 for testing imported message type; with same return type as Correctable: Response.
func (*Configuration) CorrectablePerNodeArg ¶
func (c *Configuration) CorrectablePerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request, opts ...grpc.CallOption) *CorrectableResponse
CorrectablePerNodeArg with per_node_arg option.
func (*Configuration) CorrectableStream ¶
func (c *Configuration) CorrectableStream(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableStreamResponse
CorrectableStream plain.
func (*Configuration) CorrectableStreamCombo ¶
func (c *Configuration) CorrectableStreamCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request, opts ...grpc.CallOption) *CorrectableStreamMyResponse
CorrectableCombo with all supported options.
func (*Configuration) CorrectableStreamCustomReturnType ¶
func (c *Configuration) CorrectableStreamCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableStreamMyResponse
CorrectableCustomReturnType with custom_return_type option.
func (*Configuration) CorrectableStreamEmpty ¶
func (c *Configuration) CorrectableStreamEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) *CorrectableStreamEmpty
CorrectableEmpty for testing imported message type.
func (*Configuration) CorrectableStreamEmpty2 ¶
func (c *Configuration) CorrectableStreamEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) *CorrectableStreamResponse
CorrectableEmpty2 for testing imported message type; with same return type as Correctable: Response.
func (*Configuration) CorrectableStreamPerNodeArg ¶
func (c *Configuration) CorrectableStreamPerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request, opts ...grpc.CallOption) *CorrectableStreamResponse
CorrectablePerNodeArg with per_node_arg option.
func (*Configuration) ID ¶
func (c *Configuration) ID() uint32
ID reports the identifier for the configuration.
func (*Configuration) Multicast ¶
func (c *Configuration) Multicast(in *Request) error
Multicast plain. Response type is not needed here.
func (*Configuration) Multicast2 ¶
func (c *Configuration) Multicast2(in *Request) error
Multicast2 is testing whether multiple streams work.
func (*Configuration) Multicast3 ¶
func (c *Configuration) Multicast3(in *Request) error
Multicast3 is testing imported message type.
func (*Configuration) Multicast4 ¶
func (c *Configuration) Multicast4(in *empty.Empty) error
Multicast4 is testing imported message type.
func (*Configuration) MulticastPerNodeArg ¶
MulticastPerNodeArg with per_node_arg option.
func (*Configuration) NodeIDs ¶
func (c *Configuration) NodeIDs() []uint32
NodeIDs returns a slice containing the local ids of all the nodes in the configuration. IDs are returned in the same order as they were provided in the creation of the Configuration.
func (*Configuration) Nodes ¶
func (c *Configuration) Nodes() []*Node
Nodes returns a slice of each available node. IDs are returned in the same order as they were provided in the creation of the Configuration.
func (*Configuration) OrderingCombo ¶
func (c *Configuration) OrderingCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request) (resp *MyResponse, err error)
OrderingCombo is a quorum call invoked on each node in configuration c, with the argument returned by the provided function f, and returns the combined result. The per node function f receives a copy of the Request request argument and returns a Request manipulated to be passed to the given nodeID. The function f must be thread-safe.
func (*Configuration) OrderingCustomReturnType ¶
func (c *Configuration) OrderingCustomReturnType(ctx context.Context, in *Request) (resp *MyResponse, err error)
OrderingCustomReturnType is a quorum call invoked on all nodes in configuration c, with the same argument in, and returns a combined result.
func (*Configuration) OrderingFuture ¶
func (c *Configuration) OrderingFuture(ctx context.Context, in *Request) *FutureResponse
OrderingFuture asynchronously invokes a quorum call on configuration c and returns a FutureResponse, which can be used to inspect the quorum call reply and error when available.
func (*Configuration) OrderingFutureCombo ¶
func (c *Configuration) OrderingFutureCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request) *FutureMyResponse
OrderingFutureCombo asynchronously invokes a quorum call on each node in configuration c, with the argument returned by the provided function f and returns the result as a FutureMyResponse, which can be used to inspect the quorum call reply and error when available. The provide per node function f takes the provided Request argument and returns an Response object to be passed to the given nodeID. The per node function f should be thread-safe.
func (*Configuration) OrderingFutureCustomReturnType ¶
func (c *Configuration) OrderingFutureCustomReturnType(ctx context.Context, in *Request) *FutureMyResponse
OrderingFutureCustomReturnType asynchronously invokes a quorum call on configuration c and returns a FutureMyResponse, which can be used to inspect the quorum call reply and error when available.
func (*Configuration) OrderingFuturePerNodeArg ¶
func (c *Configuration) OrderingFuturePerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request) *FutureResponse
OrderingFuturePerNodeArg asynchronously invokes a quorum call on each node in configuration c, with the argument returned by the provided function f and returns the result as a FutureResponse, which can be used to inspect the quorum call reply and error when available. The provide per node function f takes the provided Request argument and returns an Response object to be passed to the given nodeID. The per node function f should be thread-safe.
func (*Configuration) OrderingPerNodeArg ¶
func (c *Configuration) OrderingPerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request) (resp *Response, err error)
OrderingPerNodeArg is a quorum call invoked on each node in configuration c, with the argument returned by the provided function f, and returns the combined result. The per node function f receives a copy of the Request request argument and returns a Request manipulated to be passed to the given nodeID. The function f must be thread-safe.
func (*Configuration) OrderingQC ¶
OrderingQC is a quorum call invoked on all nodes in configuration c, with the same argument in, and returns a combined result.
func (*Configuration) QuorumCall ¶
func (c *Configuration) QuorumCall(ctx context.Context, in *Request, opts ...grpc.CallOption) (resp *Response, err error)
QuorumCall plain.
func (*Configuration) QuorumCallCombo ¶
func (c *Configuration) QuorumCallCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request, opts ...grpc.CallOption) (resp *MyResponse, err error)
QuorumCallCombo with all supported options.
func (*Configuration) QuorumCallCustomReturnType ¶
func (c *Configuration) QuorumCallCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) (resp *MyResponse, err error)
QuorumCall with custom_return_type option.
func (*Configuration) QuorumCallEmpty ¶
func (c *Configuration) QuorumCallEmpty(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (resp *Response, err error)
QuorumCallEmpty for testing imported message type.
func (*Configuration) QuorumCallEmpty2 ¶
func (c *Configuration) QuorumCallEmpty2(ctx context.Context, in *Request, opts ...grpc.CallOption) (resp *empty.Empty, err error)
QuorumCallEmpty2 for testing imported message type.
func (*Configuration) QuorumCallFuture ¶
func (c *Configuration) QuorumCallFuture(ctx context.Context, in *Request, opts ...grpc.CallOption) *FutureResponse
QuorumCallFuture plain.
func (*Configuration) QuorumCallFuture2 ¶
func (c *Configuration) QuorumCallFuture2(ctx context.Context, in *Request, opts ...grpc.CallOption) *FutureResponse
QuorumCallFuture2 plain; with same return type: Response.
func (*Configuration) QuorumCallFutureCombo ¶
func (c *Configuration) QuorumCallFutureCombo(ctx context.Context, in *Request, f func(*Request, uint32) *Request, opts ...grpc.CallOption) *FutureMyResponse
QuorumCallFutureCombo with all supported options.
func (*Configuration) QuorumCallFutureCustomReturnType ¶
func (c *Configuration) QuorumCallFutureCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) *FutureMyResponse
QuorumCallFutureCustomReturnType with custom_return_type option.
func (*Configuration) QuorumCallFutureEmpty ¶
func (c *Configuration) QuorumCallFutureEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) *FutureEmpty
QuorumCallFutureEmpty for testing imported message type.
func (*Configuration) QuorumCallFutureEmpty2 ¶
func (c *Configuration) QuorumCallFutureEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) *FutureResponse
QuorumCallFutureEmpty2 for testing imported message type; with same return type as QuorumCallFuture: Response.
func (*Configuration) QuorumCallFuturePerNodeArg ¶
func (c *Configuration) QuorumCallFuturePerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request, opts ...grpc.CallOption) *FutureResponse
QuorumCallFuturePerNodeArg with per_node_arg option.
func (*Configuration) QuorumCallPerNodeArg ¶
func (c *Configuration) QuorumCallPerNodeArg(ctx context.Context, in *Request, f func(*Request, uint32) *Request, opts ...grpc.CallOption) (resp *Response, err error)
QuorumCall with per_node_arg option.
func (*Configuration) Size ¶
func (c *Configuration) Size() int
Size returns the number of nodes in the configuration.
func (*Configuration) String ¶
func (c *Configuration) String() string
func (*Configuration) SubError ¶
func (c *Configuration) SubError() <-chan GRPCError
SubError returns a channel for listening to individual node errors. Currently only a single listener is supported.
type CorrectableEmpty ¶
type CorrectableEmpty struct {
// the actual reply
*empty.Empty
NodeIDs []uint32
// contains filtered or unexported fields
}
CorrectableEmpty is a correctable object for processing replies.
func (*CorrectableEmpty) Done ¶
func (c *CorrectableEmpty) Done() <-chan struct{}
Done returns a channel that will be closed when the correctable quorum call is done. A call is considered done when the quorum function has signaled that a quorum of replies was received or the call returned an error.
func (*CorrectableEmpty) Get ¶
func (c *CorrectableEmpty) Get() (*empty.Empty, int, error)
Get returns the reply, level and any error associated with the called method. The method does not block until a (possibly intermediate) reply or error is available. Level is set to LevelNotSet if no reply has yet been received. The Done or Watch methods should be used to ensure that a reply is available.
func (*CorrectableEmpty) Watch ¶
func (c *CorrectableEmpty) Watch(level int) <-chan struct{}
Watch returns a channel that will be closed when a reply or error at or above the specified level is available. If the call is done, the channel is closed regardless of the specified level.
type CorrectableMyResponse ¶
type CorrectableMyResponse struct {
// the actual reply
*MyResponse
NodeIDs []uint32
// contains filtered or unexported fields
}
CorrectableMyResponse is a correctable object for processing replies.
func (*CorrectableMyResponse) Done ¶
func (c *CorrectableMyResponse) Done() <-chan struct{}
Done returns a channel that will be closed when the correctable quorum call is done. A call is considered done when the quorum function has signaled that a quorum of replies was received or the call returned an error.
func (*CorrectableMyResponse) Get ¶
func (c *CorrectableMyResponse) Get() (*MyResponse, int, error)
Get returns the reply, level and any error associated with the called method. The method does not block until a (possibly intermediate) reply or error is available. Level is set to LevelNotSet if no reply has yet been received. The Done or Watch methods should be used to ensure that a reply is available.
func (*CorrectableMyResponse) Watch ¶
func (c *CorrectableMyResponse) Watch(level int) <-chan struct{}
Watch returns a channel that will be closed when a reply or error at or above the specified level is available. If the call is done, the channel is closed regardless of the specified level.
type CorrectableResponse ¶
type CorrectableResponse struct {
// the actual reply
*Response
NodeIDs []uint32
// contains filtered or unexported fields
}
CorrectableResponse is a correctable object for processing replies.
func (*CorrectableResponse) Done ¶
func (c *CorrectableResponse) Done() <-chan struct{}
Done returns a channel that will be closed when the correctable quorum call is done. A call is considered done when the quorum function has signaled that a quorum of replies was received or the call returned an error.
func (*CorrectableResponse) Get ¶
func (c *CorrectableResponse) Get() (*Response, int, error)
Get returns the reply, level and any error associated with the called method. The method does not block until a (possibly intermediate) reply or error is available. Level is set to LevelNotSet if no reply has yet been received. The Done or Watch methods should be used to ensure that a reply is available.
func (*CorrectableResponse) Watch ¶
func (c *CorrectableResponse) Watch(level int) <-chan struct{}
Watch returns a channel that will be closed when a reply or error at or above the specified level is available. If the call is done, the channel is closed regardless of the specified level.
type CorrectableStreamEmpty ¶
type CorrectableStreamEmpty struct {
// the actual reply
*empty.Empty
NodeIDs []uint32
// contains filtered or unexported fields
}
CorrectableStreamEmpty is a correctable object for processing replies.
func (*CorrectableStreamEmpty) Done ¶
func (c *CorrectableStreamEmpty) Done() <-chan struct{}
Done returns a channel that will be closed when the correctable quorum call is done. A call is considered done when the quorum function has signaled that a quorum of replies was received or the call returned an error.
func (*CorrectableStreamEmpty) Get ¶
func (c *CorrectableStreamEmpty) Get() (*empty.Empty, int, error)
Get returns the reply, level and any error associated with the called method. The method does not block until a (possibly intermediate) reply or error is available. Level is set to LevelNotSet if no reply has yet been received. The Done or Watch methods should be used to ensure that a reply is available.
func (*CorrectableStreamEmpty) Watch ¶
func (c *CorrectableStreamEmpty) Watch(level int) <-chan struct{}
Watch returns a channel that will be closed when a reply or error at or above the specified level is available. If the call is done, the channel is closed regardless of the specified level.
type CorrectableStreamMyResponse ¶
type CorrectableStreamMyResponse struct {
// the actual reply
*MyResponse
NodeIDs []uint32
// contains filtered or unexported fields
}
CorrectableStreamMyResponse is a correctable object for processing replies.
func (*CorrectableStreamMyResponse) Done ¶
func (c *CorrectableStreamMyResponse) Done() <-chan struct{}
Done returns a channel that will be closed when the correctable quorum call is done. A call is considered done when the quorum function has signaled that a quorum of replies was received or the call returned an error.
func (*CorrectableStreamMyResponse) Get ¶
func (c *CorrectableStreamMyResponse) Get() (*MyResponse, int, error)
Get returns the reply, level and any error associated with the called method. The method does not block until a (possibly intermediate) reply or error is available. Level is set to LevelNotSet if no reply has yet been received. The Done or Watch methods should be used to ensure that a reply is available.
func (*CorrectableStreamMyResponse) Watch ¶
func (c *CorrectableStreamMyResponse) Watch(level int) <-chan struct{}
Watch returns a channel that will be closed when a reply or error at or above the specified level is available. If the call is done, the channel is closed regardless of the specified level.
type CorrectableStreamResponse ¶
type CorrectableStreamResponse struct {
// the actual reply
*Response
NodeIDs []uint32
// contains filtered or unexported fields
}
CorrectableStreamResponse is a correctable object for processing replies.
func (*CorrectableStreamResponse) Done ¶
func (c *CorrectableStreamResponse) Done() <-chan struct{}
Done returns a channel that will be closed when the correctable quorum call is done. A call is considered done when the quorum function has signaled that a quorum of replies was received or the call returned an error.
func (*CorrectableStreamResponse) Get ¶
func (c *CorrectableStreamResponse) Get() (*Response, int, error)
Get returns the reply, level and any error associated with the called method. The method does not block until a (possibly intermediate) reply or error is available. Level is set to LevelNotSet if no reply has yet been received. The Done or Watch methods should be used to ensure that a reply is available.
func (*CorrectableStreamResponse) Watch ¶
func (c *CorrectableStreamResponse) Watch(level int) <-chan struct{}
Watch returns a channel that will be closed when a reply or error at or above the specified level is available. If the call is done, the channel is closed regardless of the specified level.
type FutureEmpty ¶
type FutureEmpty struct {
// the actual reply
*empty.Empty
NodeIDs []uint32
// contains filtered or unexported fields
}
FutureEmpty is a future object for processing replies.
func (*FutureEmpty) Done ¶
func (f *FutureEmpty) Done() bool
Done reports if a reply and/or error is available for the called method.
type FutureMyResponse ¶
type FutureMyResponse struct {
// the actual reply
*MyResponse
NodeIDs []uint32
// contains filtered or unexported fields
}
FutureMyResponse is a future object for processing replies.
func (*FutureMyResponse) Done ¶
func (f *FutureMyResponse) Done() bool
Done reports if a reply and/or error is available for the called method.
func (*FutureMyResponse) Get ¶
func (f *FutureMyResponse) Get() (*MyResponse, error)
Get returns the reply and any error associated with the called method. The method blocks until a reply or error is available.
type FutureResponse ¶
type FutureResponse struct {
// the actual reply
*Response
NodeIDs []uint32
// contains filtered or unexported fields
}
FutureResponse is a future object for processing replies.
func (*FutureResponse) Done ¶
func (f *FutureResponse) Done() bool
Done reports if a reply and/or error is available for the called method.
func (*FutureResponse) Get ¶
func (f *FutureResponse) Get() (*Response, error)
Get returns the reply and any error associated with the called method. The method blocks until a reply or error is available.
type GorumsServer ¶
type GorumsServer struct {
// contains filtered or unexported fields
}
GorumsServer serves all ordering based RPCs using registered handlers.
func NewGorumsServer ¶
func NewGorumsServer(opts ...ServerOption) *GorumsServer
NewGorumsServer returns a new instance of GorumsServer.
func (*GorumsServer) GracefulStop ¶
func (s *GorumsServer) GracefulStop()
GracefulStop waits for all RPCs to finish before stopping.
func (*GorumsServer) RegisterZorumsServiceServer ¶
func (s *GorumsServer) RegisterZorumsServiceServer(srv ZorumsService)
type IllegalConfigError ¶
type IllegalConfigError string
An IllegalConfigError reports that a specified configuration could not be created.
func (IllegalConfigError) Error ¶
func (e IllegalConfigError) Error() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages a pool of node configurations on which quorum remote procedure calls can be made.
func NewManager ¶
func NewManager(opts ...ManagerOption) (*Manager, error)
NewManager attempts to connect to the given set of node addresses and if successful returns a new Manager containing connections to those nodes.
func (*Manager) AddNode ¶
AddNode attempts to dial to the provide node address. The node is added to the Manager's pool of nodes if a connection was established.
func (*Manager) Close ¶
func (m *Manager) Close()
Close closes all node connections and any client streams.
func (*Manager) Configuration ¶
func (m *Manager) Configuration(id uint32) (config *Configuration, found bool)
Configuration returns the configuration with the given global identifier if present.
func (*Manager) ConfigurationIDs ¶
ConfigurationIDs returns the identifier of each available configuration.
func (*Manager) Configurations ¶
func (m *Manager) Configurations() []*Configuration
Configurations returns a slice of each available configuration.
func (*Manager) NewConfiguration ¶
func (m *Manager) NewConfiguration(ids []uint32, qspec QuorumSpec) (*Configuration, error)
NewConfiguration returns a new configuration given quorum specification and a timeout.
func (*Manager) NodeIDs ¶
NodeIDs returns the identifier of each available node. IDs are returned in the same order as they were provided in the creation of the Manager.
type ManagerOption ¶
type ManagerOption func(*managerOptions)
ManagerOption provides a way to set different options on a new Manager.
func WithBackoff ¶
func WithBackoff(backoff backoff.Config) ManagerOption
WithBackoff allows for changing the backoff delays used by Gorums.
func WithDialTimeout ¶
func WithDialTimeout(timeout time.Duration) ManagerOption
WithDialTimeout returns a ManagerOption which is used to set the dial context timeout to be used when initially connecting to each node in its pool.
func WithGrpcDialOptions ¶
func WithGrpcDialOptions(opts ...grpc.DialOption) ManagerOption
WithGrpcDialOptions returns a ManagerOption which sets any gRPC dial options the Manager should use when initially connecting to each node in its pool.
func WithLogger ¶
func WithLogger(logger *log.Logger) ManagerOption
WithLogger returns a ManagerOption which sets an optional error logger for the Manager.
func WithMetadata ¶ added in v0.2.1
func WithMetadata(md metadata.MD) ManagerOption
WithMetadata returns a ManagerOption that sets the metadata that is sent to each node when the connection is initially established. This metadata can be retrieved from the server-side method handlers.
func WithNoConnect ¶
func WithNoConnect() ManagerOption
WithNoConnect returns a ManagerOption which instructs the Manager not to connect to any of its nodes. Mainly used for testing purposes.
func WithNodeList ¶ added in v0.2.1
func WithNodeList(addrsList []string) ManagerOption
WithNodeList returns a ManagerOption containing the provided list of node addresses. With this option, NodeIDs are generated by the Manager.
func WithNodeMap ¶ added in v0.2.1
func WithNodeMap(idMap map[string]uint32) ManagerOption
WithNodeMap returns a ManagerOption containing the provided mapping from node addresses to application-specific IDs.
func WithPerNodeMetadata ¶ added in v0.2.1
func WithPerNodeMetadata(f func(uint32) metadata.MD) ManagerOption
WithPerNodeMetadata returns a ManagerOption that allows you to set metadata for each node individually.
func WithSendBufferSize ¶
func WithSendBufferSize(size uint) ManagerOption
WithSendBufferSize allows for changing the size of the send buffer used by Gorums. A larger buffer might achieve higher throughput for asynchronous calltypes, but at the cost of latency.
func WithTracing ¶
func WithTracing() ManagerOption
WithTracing controls whether to trace quorum calls for this Manager instance using the golang.org/x/net/trace package. Tracing is currently only supported for regular quorum calls.
type MultiSorter ¶
type MultiSorter struct {
// contains filtered or unexported fields
}
MultiSorter implements the Sort interface, sorting the nodes within.
func OrderedBy ¶
func OrderedBy(less ...lessFunc) *MultiSorter
OrderedBy returns a Sorter that sorts using the less functions, in order. Call its Sort method to sort the data.
func (*MultiSorter) Less ¶
func (ms *MultiSorter) Less(i, j int) bool
Less is part of sort.Interface. It is implemented by looping along the less functions until it finds a comparison that is either Less or !Less. Note that it can call the less functions twice per call. We could change the functions to return -1, 0, 1 and reduce the number of calls for greater efficiency: an exercise for the reader.
func (*MultiSorter) Sort ¶
func (ms *MultiSorter) Sort(nodes []*Node)
Sort sorts the argument slice according to the less functions passed to OrderedBy.
type MyResponse ¶
type MyResponse struct {
Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"`
// contains filtered or unexported fields
}
func (*MyResponse) Descriptor
deprecated
func (*MyResponse) Descriptor() ([]byte, []int)
Deprecated: Use MyResponse.ProtoReflect.Descriptor instead.
func (*MyResponse) GetValue ¶
func (x *MyResponse) GetValue() string
func (*MyResponse) ProtoMessage ¶
func (*MyResponse) ProtoMessage()
func (*MyResponse) ProtoReflect ¶
func (x *MyResponse) ProtoReflect() protoreflect.Message
func (*MyResponse) Reset ¶
func (x *MyResponse) Reset()
func (*MyResponse) String ¶
func (x *MyResponse) String() string
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node encapsulates the state of a node on which a remote procedure call can be performed.
func (*Node) Correctable ¶
func (*Node) CorrectableCombo ¶
func (*Node) CorrectableCustomReturnType ¶
func (*Node) CorrectableEmpty ¶
func (*Node) CorrectableEmpty2 ¶
func (*Node) CorrectablePerNodeArg ¶
func (*Node) CorrectableStream ¶
func (*Node) CorrectableStreamCombo ¶
func (*Node) CorrectableStreamCustomReturnType ¶
func (*Node) CorrectableStreamEmpty ¶
func (*Node) CorrectableStreamEmpty2 ¶
func (*Node) CorrectableStreamPerNodeArg ¶
func (*Node) FullString ¶
FullString returns a more descriptive string representation of n that includes id, network address and latency information.
func (*Node) LastErr ¶
LastErr returns the last error encountered (if any) when invoking a remote procedure call on this node.
func (*Node) Latency ¶
Latency returns the latency of the last successful remote procedure call made to this node.
func (*Node) OrderingUnaryRPC ¶
func (n *Node) OrderingUnaryRPC(ctx context.Context, in *Request, opts ...grpc.CallOption) (resp *Response, err error)
OrderingUnaryRPC is testing that we can create ordered Unary RPCs
func (*Node) QuorumCall ¶
func (*Node) QuorumCallCombo ¶
func (*Node) QuorumCallCustomReturnType ¶
func (*Node) QuorumCallEmpty ¶
func (*Node) QuorumCallEmpty2 ¶
func (*Node) QuorumCallFuture ¶
func (*Node) QuorumCallFuture2 ¶
func (*Node) QuorumCallFutureCombo ¶
func (*Node) QuorumCallFutureCustomReturnType ¶
func (*Node) QuorumCallFutureEmpty ¶
func (*Node) QuorumCallFutureEmpty2 ¶
func (*Node) QuorumCallFuturePerNodeArg ¶
func (*Node) QuorumCallPerNodeArg ¶
type NodeNotFoundError ¶
type NodeNotFoundError uint32
A NodeNotFoundError reports that a specified node could not be found.
func (NodeNotFoundError) Error ¶
func (e NodeNotFoundError) Error() string
type QuorumCallError ¶
A QuorumCallError is used to report that a quorum call failed.
func (QuorumCallError) Error ¶
func (e QuorumCallError) Error() string
type QuorumSpec ¶
type QuorumSpec interface {
// QuorumCallQF is the quorum function for the QuorumCall
// quorum call method. The in parameter is the request object
// supplied to the QuorumCall method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallQF(in *Request, replies map[uint32]*Response) (*Response, bool)
// QuorumCallPerNodeArgQF is the quorum function for the QuorumCallPerNodeArg
// quorum call method. The in parameter is the request object
// supplied to the QuorumCallPerNodeArg method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallPerNodeArgQF(in *Request, replies map[uint32]*Response) (*Response, bool)
// QuorumCallCustomReturnTypeQF is the quorum function for the QuorumCallCustomReturnType
// quorum call method. The in parameter is the request object
// supplied to the QuorumCallCustomReturnType method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallCustomReturnTypeQF(in *Request, replies map[uint32]*Response) (*MyResponse, bool)
// QuorumCallComboQF is the quorum function for the QuorumCallCombo
// quorum call method. The in parameter is the request object
// supplied to the QuorumCallCombo method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallComboQF(in *Request, replies map[uint32]*Response) (*MyResponse, bool)
// QuorumCallEmptyQF is the quorum function for the QuorumCallEmpty
// quorum call method. The in parameter is the request object
// supplied to the QuorumCallEmpty method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *empty.Empty'.
QuorumCallEmptyQF(in *empty.Empty, replies map[uint32]*Response) (*Response, bool)
// QuorumCallEmpty2QF is the quorum function for the QuorumCallEmpty2
// quorum call method. The in parameter is the request object
// supplied to the QuorumCallEmpty2 method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallEmpty2QF(in *Request, replies map[uint32]*empty.Empty) (*empty.Empty, bool)
// QuorumCallFutureQF is the quorum function for the QuorumCallFuture
// asynchronous quorum call method. The in parameter is the request object
// supplied to the QuorumCallFuture method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallFutureQF(in *Request, replies map[uint32]*Response) (*Response, bool)
// QuorumCallFuturePerNodeArgQF is the quorum function for the QuorumCallFuturePerNodeArg
// asynchronous quorum call method. The in parameter is the request object
// supplied to the QuorumCallFuturePerNodeArg method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallFuturePerNodeArgQF(in *Request, replies map[uint32]*Response) (*Response, bool)
// QuorumCallFutureCustomReturnTypeQF is the quorum function for the QuorumCallFutureCustomReturnType
// asynchronous quorum call method. The in parameter is the request object
// supplied to the QuorumCallFutureCustomReturnType method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallFutureCustomReturnTypeQF(in *Request, replies map[uint32]*Response) (*MyResponse, bool)
// QuorumCallFutureComboQF is the quorum function for the QuorumCallFutureCombo
// asynchronous quorum call method. The in parameter is the request object
// supplied to the QuorumCallFutureCombo method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallFutureComboQF(in *Request, replies map[uint32]*Response) (*MyResponse, bool)
// QuorumCallFuture2QF is the quorum function for the QuorumCallFuture2
// asynchronous quorum call method. The in parameter is the request object
// supplied to the QuorumCallFuture2 method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallFuture2QF(in *Request, replies map[uint32]*Response) (*Response, bool)
// QuorumCallFutureEmptyQF is the quorum function for the QuorumCallFutureEmpty
// asynchronous quorum call method. The in parameter is the request object
// supplied to the QuorumCallFutureEmpty method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
QuorumCallFutureEmptyQF(in *Request, replies map[uint32]*empty.Empty) (*empty.Empty, bool)
// QuorumCallFutureEmpty2QF is the quorum function for the QuorumCallFutureEmpty2
// asynchronous quorum call method. The in parameter is the request object
// supplied to the QuorumCallFutureEmpty2 method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *empty.Empty'.
QuorumCallFutureEmpty2QF(in *empty.Empty, replies map[uint32]*Response) (*Response, bool)
// CorrectableQF is the quorum function for the Correctable
// correctable quorum call method. The in parameter is the request object
// supplied to the Correctable method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableQF(in *Request, replies map[uint32]*Response) (*Response, int, bool)
// CorrectablePerNodeArgQF is the quorum function for the CorrectablePerNodeArg
// correctable quorum call method. The in parameter is the request object
// supplied to the CorrectablePerNodeArg method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectablePerNodeArgQF(in *Request, replies map[uint32]*Response) (*Response, int, bool)
// CorrectableCustomReturnTypeQF is the quorum function for the CorrectableCustomReturnType
// correctable quorum call method. The in parameter is the request object
// supplied to the CorrectableCustomReturnType method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableCustomReturnTypeQF(in *Request, replies map[uint32]*Response) (*MyResponse, int, bool)
// CorrectableComboQF is the quorum function for the CorrectableCombo
// correctable quorum call method. The in parameter is the request object
// supplied to the CorrectableCombo method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableComboQF(in *Request, replies map[uint32]*Response) (*MyResponse, int, bool)
// CorrectableEmptyQF is the quorum function for the CorrectableEmpty
// correctable quorum call method. The in parameter is the request object
// supplied to the CorrectableEmpty method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableEmptyQF(in *Request, replies map[uint32]*empty.Empty) (*empty.Empty, int, bool)
// CorrectableEmpty2QF is the quorum function for the CorrectableEmpty2
// correctable quorum call method. The in parameter is the request object
// supplied to the CorrectableEmpty2 method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *empty.Empty'.
CorrectableEmpty2QF(in *empty.Empty, replies map[uint32]*Response) (*Response, int, bool)
// CorrectableStreamQF is the quorum function for the CorrectableStream
// correctable stream quorum call method. The in parameter is the request object
// supplied to the CorrectableStream method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableStreamQF(in *Request, replies map[uint32]*Response) (*Response, int, bool)
// CorrectableStreamPerNodeArgQF is the quorum function for the CorrectableStreamPerNodeArg
// correctable stream quorum call method. The in parameter is the request object
// supplied to the CorrectableStreamPerNodeArg method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableStreamPerNodeArgQF(in *Request, replies map[uint32]*Response) (*Response, int, bool)
// CorrectableStreamCustomReturnTypeQF is the quorum function for the CorrectableStreamCustomReturnType
// correctable stream quorum call method. The in parameter is the request object
// supplied to the CorrectableStreamCustomReturnType method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableStreamCustomReturnTypeQF(in *Request, replies map[uint32]*Response) (*MyResponse, int, bool)
// CorrectableStreamComboQF is the quorum function for the CorrectableStreamCombo
// correctable stream quorum call method. The in parameter is the request object
// supplied to the CorrectableStreamCombo method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableStreamComboQF(in *Request, replies map[uint32]*Response) (*MyResponse, int, bool)
// CorrectableStreamEmptyQF is the quorum function for the CorrectableStreamEmpty
// correctable stream quorum call method. The in parameter is the request object
// supplied to the CorrectableStreamEmpty method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
CorrectableStreamEmptyQF(in *Request, replies map[uint32]*empty.Empty) (*empty.Empty, int, bool)
// CorrectableStreamEmpty2QF is the quorum function for the CorrectableStreamEmpty2
// correctable stream quorum call method. The in parameter is the request object
// supplied to the CorrectableStreamEmpty2 method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *empty.Empty'.
CorrectableStreamEmpty2QF(in *empty.Empty, replies map[uint32]*Response) (*Response, int, bool)
// OrderingQCQF is the quorum function for the OrderingQC
// ordered quorum call method. The in parameter is the request object
// supplied to the OrderingQC method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
OrderingQCQF(in *Request, replies map[uint32]*Response) (*Response, bool)
// OrderingPerNodeArgQF is the quorum function for the OrderingPerNodeArg
// ordered quorum call method. The in parameter is the request object
// supplied to the OrderingPerNodeArg method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
OrderingPerNodeArgQF(in *Request, replies map[uint32]*Response) (*Response, bool)
// OrderingCustomReturnTypeQF is the quorum function for the OrderingCustomReturnType
// ordered quorum call method. The in parameter is the request object
// supplied to the OrderingCustomReturnType method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
OrderingCustomReturnTypeQF(in *Request, replies map[uint32]*Response) (*MyResponse, bool)
// OrderingComboQF is the quorum function for the OrderingCombo
// ordered quorum call method. The in parameter is the request object
// supplied to the OrderingCombo method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
OrderingComboQF(in *Request, replies map[uint32]*Response) (*MyResponse, bool)
// OrderingFutureQF is the quorum function for the OrderingFuture
// asynchronous ordered quorum call method. The in parameter is the request object
// supplied to the OrderingFuture method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
OrderingFutureQF(in *Request, replies map[uint32]*Response) (*Response, bool)
// OrderingFuturePerNodeArgQF is the quorum function for the OrderingFuturePerNodeArg
// asynchronous ordered quorum call method. The in parameter is the request object
// supplied to the OrderingFuturePerNodeArg method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
OrderingFuturePerNodeArgQF(in *Request, replies map[uint32]*Response) (*Response, bool)
// OrderingFutureCustomReturnTypeQF is the quorum function for the OrderingFutureCustomReturnType
// asynchronous ordered quorum call method. The in parameter is the request object
// supplied to the OrderingFutureCustomReturnType method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
OrderingFutureCustomReturnTypeQF(in *Request, replies map[uint32]*Response) (*MyResponse, bool)
// OrderingFutureComboQF is the quorum function for the OrderingFutureCombo
// asynchronous ordered quorum call method. The in parameter is the request object
// supplied to the OrderingFutureCombo method at call time, and may or may not
// be used by the quorum function. If the in parameter is not needed
// you should implement your quorum function with '_ *Request'.
OrderingFutureComboQF(in *Request, replies map[uint32]*Response) (*MyResponse, bool)
}
QuorumSpec is the interface of quorum functions for ZorumsService.
type Request ¶
type Request struct {
Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"`
// contains filtered or unexported fields
}
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct {
Result int64 `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"`
// contains filtered or unexported fields
}
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type ServerOption ¶
type ServerOption func(*serverOptions)
ServerOption is used to change settings for the GorumsServer
func WithGRPCServerOptions ¶
func WithGRPCServerOptions(opts ...grpc.ServerOption) ServerOption
WithGRPCServerOptions allows to set gRPC options for the server.
func WithServerBufferSize ¶
func WithServerBufferSize(size uint) ServerOption
WithServerBufferSize sets the buffer size for the server. A larger buffer may result in higher throughput at the cost of higher latency.
type UnimplementedZorumsServiceServer ¶
type UnimplementedZorumsServiceServer struct {
}
UnimplementedZorumsServiceServer must be embedded to have forward compatible implementations.
func (*UnimplementedZorumsServiceServer) Correctable ¶
func (*UnimplementedZorumsServiceServer) CorrectableCombo ¶
func (*UnimplementedZorumsServiceServer) CorrectableCustomReturnType ¶
func (*UnimplementedZorumsServiceServer) CorrectableEmpty ¶
func (*UnimplementedZorumsServiceServer) CorrectableEmpty2 ¶
func (*UnimplementedZorumsServiceServer) CorrectablePerNodeArg ¶
func (*UnimplementedZorumsServiceServer) CorrectableStream ¶
func (*UnimplementedZorumsServiceServer) CorrectableStream(*Request, ZorumsService_CorrectableStreamServer) error
func (*UnimplementedZorumsServiceServer) CorrectableStreamCombo ¶
func (*UnimplementedZorumsServiceServer) CorrectableStreamCombo(*Request, ZorumsService_CorrectableStreamComboServer) error
func (*UnimplementedZorumsServiceServer) CorrectableStreamCustomReturnType ¶
func (*UnimplementedZorumsServiceServer) CorrectableStreamCustomReturnType(*Request, ZorumsService_CorrectableStreamCustomReturnTypeServer) error
func (*UnimplementedZorumsServiceServer) CorrectableStreamEmpty ¶
func (*UnimplementedZorumsServiceServer) CorrectableStreamEmpty(*Request, ZorumsService_CorrectableStreamEmptyServer) error
func (*UnimplementedZorumsServiceServer) CorrectableStreamEmpty2 ¶
func (*UnimplementedZorumsServiceServer) CorrectableStreamEmpty2(*empty.Empty, ZorumsService_CorrectableStreamEmpty2Server) error
func (*UnimplementedZorumsServiceServer) CorrectableStreamPerNodeArg ¶
func (*UnimplementedZorumsServiceServer) CorrectableStreamPerNodeArg(*Request, ZorumsService_CorrectableStreamPerNodeArgServer) error
func (*UnimplementedZorumsServiceServer) Multicast2 ¶
func (*UnimplementedZorumsServiceServer) Multicast3 ¶
func (*UnimplementedZorumsServiceServer) Multicast4 ¶
func (*UnimplementedZorumsServiceServer) MulticastPerNodeArg ¶
func (*UnimplementedZorumsServiceServer) OrderingCombo ¶
func (*UnimplementedZorumsServiceServer) OrderingCustomReturnType ¶
func (*UnimplementedZorumsServiceServer) OrderingFuture ¶
func (*UnimplementedZorumsServiceServer) OrderingFutureCombo ¶
func (*UnimplementedZorumsServiceServer) OrderingFutureCustomReturnType ¶
func (*UnimplementedZorumsServiceServer) OrderingFuturePerNodeArg ¶
func (*UnimplementedZorumsServiceServer) OrderingPerNodeArg ¶
func (*UnimplementedZorumsServiceServer) OrderingQC ¶
func (*UnimplementedZorumsServiceServer) OrderingUnaryRPC ¶
func (*UnimplementedZorumsServiceServer) QuorumCall ¶
func (*UnimplementedZorumsServiceServer) QuorumCallCombo ¶
func (*UnimplementedZorumsServiceServer) QuorumCallCustomReturnType ¶
func (*UnimplementedZorumsServiceServer) QuorumCallEmpty ¶
func (*UnimplementedZorumsServiceServer) QuorumCallEmpty2 ¶
func (*UnimplementedZorumsServiceServer) QuorumCallFuture ¶
func (*UnimplementedZorumsServiceServer) QuorumCallFuture2 ¶
func (*UnimplementedZorumsServiceServer) QuorumCallFutureCombo ¶
func (*UnimplementedZorumsServiceServer) QuorumCallFutureCustomReturnType ¶
func (*UnimplementedZorumsServiceServer) QuorumCallFutureEmpty ¶
func (*UnimplementedZorumsServiceServer) QuorumCallFutureEmpty2 ¶
func (*UnimplementedZorumsServiceServer) QuorumCallFuturePerNodeArg ¶
func (*UnimplementedZorumsServiceServer) QuorumCallPerNodeArg ¶
type ZorumsService ¶
type ZorumsService interface {
Multicast(context.Context, *Request)
MulticastPerNodeArg(context.Context, *Request)
Multicast2(context.Context, *Request)
Multicast3(context.Context, *Request)
Multicast4(context.Context, *empty.Empty)
OrderingQC(context.Context, *Request, func(*Response, error))
OrderingPerNodeArg(context.Context, *Request, func(*Response, error))
OrderingCustomReturnType(context.Context, *Request, func(*Response, error))
OrderingCombo(context.Context, *Request, func(*Response, error))
OrderingUnaryRPC(context.Context, *Request, func(*Response, error))
OrderingFuture(context.Context, *Request, func(*Response, error))
OrderingFuturePerNodeArg(context.Context, *Request, func(*Response, error))
OrderingFutureCustomReturnType(context.Context, *Request, func(*Response, error))
OrderingFutureCombo(context.Context, *Request, func(*Response, error))
Unicast(context.Context, *Request)
Unicast2(context.Context, *Request)
}
ZorumsService is the server-side API for the ZorumsService Service
type ZorumsServiceClient ¶
type ZorumsServiceClient interface {
// GRPCCall plain gRPC call; testing that Gorums can ignore these, but that
// they are added to the _grpc.pb.go generated file.
GRPCCall(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCall plain.
QuorumCall(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCall with per_node_arg option.
QuorumCallPerNodeArg(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCall with custom_return_type option.
QuorumCallCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCallCombo with all supported options.
QuorumCallCombo(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCallEmpty for testing imported message type.
QuorumCallEmpty(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Response, error)
// QuorumCallEmpty2 for testing imported message type.
QuorumCallEmpty2(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error)
// Multicast plain. Response type is not needed here.
Multicast(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// MulticastPerNodeArg with per_node_arg option.
MulticastPerNodeArg(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// Multicast2 is testing whether multiple streams work.
Multicast2(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// Multicast3 is testing imported message type.
Multicast3(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error)
// Multicast4 is testing imported message type.
Multicast4(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
// QuorumCallFuture plain.
QuorumCallFuture(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCallFuturePerNodeArg with per_node_arg option.
QuorumCallFuturePerNodeArg(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCallFutureCustomReturnType with custom_return_type option.
QuorumCallFutureCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCallFutureCombo with all supported options.
QuorumCallFutureCombo(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCallFuture2 plain; with same return type: Response.
QuorumCallFuture2(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// QuorumCallFutureEmpty for testing imported message type.
QuorumCallFutureEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error)
// QuorumCallFutureEmpty2 for testing imported message type; with same return
// type as QuorumCallFuture: Response.
QuorumCallFutureEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Response, error)
// Correctable plain.
Correctable(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// CorrectablePerNodeArg with per_node_arg option.
CorrectablePerNodeArg(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// CorrectableCustomReturnType with custom_return_type option.
CorrectableCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// CorrectableCombo with all supported options.
CorrectableCombo(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// CorrectableEmpty for testing imported message type.
CorrectableEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error)
// CorrectableEmpty2 for testing imported message type; with same return
// type as Correctable: Response.
CorrectableEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Response, error)
// CorrectableStream plain.
CorrectableStream(ctx context.Context, in *Request, opts ...grpc.CallOption) (ZorumsService_CorrectableStreamClient, error)
// CorrectablePerNodeArg with per_node_arg option.
CorrectableStreamPerNodeArg(ctx context.Context, in *Request, opts ...grpc.CallOption) (ZorumsService_CorrectableStreamPerNodeArgClient, error)
// CorrectableCustomReturnType with custom_return_type option.
CorrectableStreamCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) (ZorumsService_CorrectableStreamCustomReturnTypeClient, error)
// CorrectableCombo with all supported options.
CorrectableStreamCombo(ctx context.Context, in *Request, opts ...grpc.CallOption) (ZorumsService_CorrectableStreamComboClient, error)
// CorrectableEmpty for testing imported message type.
CorrectableStreamEmpty(ctx context.Context, in *Request, opts ...grpc.CallOption) (ZorumsService_CorrectableStreamEmptyClient, error)
// CorrectableEmpty2 for testing imported message type; with same return
// type as Correctable: Response.
CorrectableStreamEmpty2(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (ZorumsService_CorrectableStreamEmpty2Client, error)
OrderingQC(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
OrderingPerNodeArg(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
OrderingCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
OrderingCombo(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// OrderingUnaryRPC is testing that we can create ordered Unary RPCs
OrderingUnaryRPC(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
OrderingFuture(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
OrderingFuturePerNodeArg(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
OrderingFutureCustomReturnType(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
OrderingFutureCombo(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
Unicast(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
Unicast2(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error)
}
ZorumsServiceClient is the client API for ZorumsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewZorumsServiceClient ¶
func NewZorumsServiceClient(cc grpc.ClientConnInterface) ZorumsServiceClient
type ZorumsServiceServer ¶
type ZorumsServiceServer interface {
// GRPCCall plain gRPC call; testing that Gorums can ignore these, but that
// they are added to the _grpc.pb.go generated file.
GRPCCall(context.Context, *Request) (*Response, error)
// QuorumCall plain.
QuorumCall(context.Context, *Request) (*Response, error)
// QuorumCall with per_node_arg option.
QuorumCallPerNodeArg(context.Context, *Request) (*Response, error)
// QuorumCall with custom_return_type option.
QuorumCallCustomReturnType(context.Context, *Request) (*Response, error)
// QuorumCallCombo with all supported options.
QuorumCallCombo(context.Context, *Request) (*Response, error)
// QuorumCallEmpty for testing imported message type.
QuorumCallEmpty(context.Context, *empty.Empty) (*Response, error)
// QuorumCallEmpty2 for testing imported message type.
QuorumCallEmpty2(context.Context, *Request) (*empty.Empty, error)
// Multicast plain. Response type is not needed here.
Multicast(context.Context, *Request) (*Response, error)
// MulticastPerNodeArg with per_node_arg option.
MulticastPerNodeArg(context.Context, *Request) (*Response, error)
// Multicast2 is testing whether multiple streams work.
Multicast2(context.Context, *Request) (*Response, error)
// Multicast3 is testing imported message type.
Multicast3(context.Context, *Request) (*empty.Empty, error)
// Multicast4 is testing imported message type.
Multicast4(context.Context, *empty.Empty) (*empty.Empty, error)
// QuorumCallFuture plain.
QuorumCallFuture(context.Context, *Request) (*Response, error)
// QuorumCallFuturePerNodeArg with per_node_arg option.
QuorumCallFuturePerNodeArg(context.Context, *Request) (*Response, error)
// QuorumCallFutureCustomReturnType with custom_return_type option.
QuorumCallFutureCustomReturnType(context.Context, *Request) (*Response, error)
// QuorumCallFutureCombo with all supported options.
QuorumCallFutureCombo(context.Context, *Request) (*Response, error)
// QuorumCallFuture2 plain; with same return type: Response.
QuorumCallFuture2(context.Context, *Request) (*Response, error)
// QuorumCallFutureEmpty for testing imported message type.
QuorumCallFutureEmpty(context.Context, *Request) (*empty.Empty, error)
// QuorumCallFutureEmpty2 for testing imported message type; with same return
// type as QuorumCallFuture: Response.
QuorumCallFutureEmpty2(context.Context, *empty.Empty) (*Response, error)
// Correctable plain.
Correctable(context.Context, *Request) (*Response, error)
// CorrectablePerNodeArg with per_node_arg option.
CorrectablePerNodeArg(context.Context, *Request) (*Response, error)
// CorrectableCustomReturnType with custom_return_type option.
CorrectableCustomReturnType(context.Context, *Request) (*Response, error)
// CorrectableCombo with all supported options.
CorrectableCombo(context.Context, *Request) (*Response, error)
// CorrectableEmpty for testing imported message type.
CorrectableEmpty(context.Context, *Request) (*empty.Empty, error)
// CorrectableEmpty2 for testing imported message type; with same return
// type as Correctable: Response.
CorrectableEmpty2(context.Context, *empty.Empty) (*Response, error)
// CorrectableStream plain.
CorrectableStream(*Request, ZorumsService_CorrectableStreamServer) error
// CorrectablePerNodeArg with per_node_arg option.
CorrectableStreamPerNodeArg(*Request, ZorumsService_CorrectableStreamPerNodeArgServer) error
// CorrectableCustomReturnType with custom_return_type option.
CorrectableStreamCustomReturnType(*Request, ZorumsService_CorrectableStreamCustomReturnTypeServer) error
// CorrectableCombo with all supported options.
CorrectableStreamCombo(*Request, ZorumsService_CorrectableStreamComboServer) error
// CorrectableEmpty for testing imported message type.
CorrectableStreamEmpty(*Request, ZorumsService_CorrectableStreamEmptyServer) error
// CorrectableEmpty2 for testing imported message type; with same return
// type as Correctable: Response.
CorrectableStreamEmpty2(*empty.Empty, ZorumsService_CorrectableStreamEmpty2Server) error
OrderingQC(context.Context, *Request) (*Response, error)
OrderingPerNodeArg(context.Context, *Request) (*Response, error)
OrderingCustomReturnType(context.Context, *Request) (*Response, error)
OrderingCombo(context.Context, *Request) (*Response, error)
// OrderingUnaryRPC is testing that we can create ordered Unary RPCs
OrderingUnaryRPC(context.Context, *Request) (*Response, error)
OrderingFuture(context.Context, *Request) (*Response, error)
OrderingFuturePerNodeArg(context.Context, *Request) (*Response, error)
OrderingFutureCustomReturnType(context.Context, *Request) (*Response, error)
OrderingFutureCombo(context.Context, *Request) (*Response, error)
Unicast(context.Context, *Request) (*Response, error)
Unicast2(context.Context, *Request) (*empty.Empty, error)
// contains filtered or unexported methods
}
ZorumsServiceServer is the server API for ZorumsService service. All implementations must embed UnimplementedZorumsServiceServer for forward compatibility
type ZorumsService_CorrectableStreamClient ¶
type ZorumsService_CorrectableStreamClient interface {
Recv() (*Response, error)
grpc.ClientStream
}
type ZorumsService_CorrectableStreamComboClient ¶
type ZorumsService_CorrectableStreamComboClient interface {
Recv() (*Response, error)
grpc.ClientStream
}
type ZorumsService_CorrectableStreamComboServer ¶
type ZorumsService_CorrectableStreamComboServer interface {
Send(*Response) error
grpc.ServerStream
}
type ZorumsService_CorrectableStreamCustomReturnTypeClient ¶
type ZorumsService_CorrectableStreamCustomReturnTypeClient interface {
Recv() (*Response, error)
grpc.ClientStream
}
type ZorumsService_CorrectableStreamCustomReturnTypeServer ¶
type ZorumsService_CorrectableStreamCustomReturnTypeServer interface {
Send(*Response) error
grpc.ServerStream
}
type ZorumsService_CorrectableStreamEmpty2Client ¶
type ZorumsService_CorrectableStreamEmpty2Client interface {
Recv() (*Response, error)
grpc.ClientStream
}
type ZorumsService_CorrectableStreamEmpty2Server ¶
type ZorumsService_CorrectableStreamEmpty2Server interface {
Send(*Response) error
grpc.ServerStream
}
type ZorumsService_CorrectableStreamEmptyClient ¶
type ZorumsService_CorrectableStreamEmptyClient interface {
Recv() (*empty.Empty, error)
grpc.ClientStream
}
type ZorumsService_CorrectableStreamEmptyServer ¶
type ZorumsService_CorrectableStreamEmptyServer interface {
Send(*empty.Empty) error
grpc.ServerStream
}
type ZorumsService_CorrectableStreamPerNodeArgClient ¶
type ZorumsService_CorrectableStreamPerNodeArgClient interface {
Recv() (*Response, error)
grpc.ClientStream
}
type ZorumsService_CorrectableStreamPerNodeArgServer ¶
type ZorumsService_CorrectableStreamPerNodeArgServer interface {
Send(*Response) error
grpc.ServerStream
}
type ZorumsService_CorrectableStreamServer ¶
type ZorumsService_CorrectableStreamServer interface {
Send(*Response) error
grpc.ServerStream
}
Source Files
¶
- config.go
- encoding.go
- errors.go
- level.go
- mgr.go
- node.go
- opts.go
- ordering.go
- server.go
- trace.go
- util.go
- zorums.pb.go
- zorums_async_gorums.pb.go
- zorums_correctable_gorums.pb.go
- zorums_grpc.pb.go
- zorums_multicast_gorums.pb.go
- zorums_node_gorums.pb.go
- zorums_ordered_gorums.pb.go
- zorums_qspec_gorums.pb.go
- zorums_quorumcall_gorums.pb.go
- zorums_server_gorums.pb.go
- zorums_types_gorums.pb.go
- zorums_unicast_gorums.pb.go