Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterElectionServer(s grpc.ServiceRegistrar, srv ElectionServer)
- func RegisterReplicaServer(s grpc.ServiceRegistrar, srv ReplicaServer)
- func RegisterSyncServer(s grpc.ServiceRegistrar, srv SyncServer)
- type ElectionClient
- type ElectionServer
- type ReplicaClient
- type ReplicaServer
- type Replica_SubscribeClient
- type Replica_SubscribeServer
- type SyncClient
- type SyncServer
- type UnimplementedElectionServer
- type UnimplementedReplicaServer
- type UnimplementedSyncServer
- type UnsafeElectionServer
- type UnsafeReplicaServer
- type UnsafeSyncServer
Constants ¶
const ( Election_Election_FullMethodName = "/compogo.cluster.service.replica.Election/Election" Election_Vote_FullMethodName = "/compogo.cluster.service.replica.Election/Vote" )
const (
Replica_Subscribe_FullMethodName = "/compogo.cluster.service.replica.Replica/Subscribe"
)
const (
Sync_Hosts_FullMethodName = "/compogo.cluster.service.replica.Sync/Hosts"
)
Variables ¶
var Election_ServiceDesc = grpc.ServiceDesc{ ServiceName: "compogo.cluster.service.replica.Election", HandlerType: (*ElectionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Election", Handler: _Election_Election_Handler, }, { MethodName: "Vote", Handler: _Election_Vote_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/Compogo/cluster/service/election.proto", }
Election_ServiceDesc is the grpc.ServiceDesc for Election service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_github_com_Compogo_cluster_service_election_proto protoreflect.FileDescriptor
var File_github_com_Compogo_cluster_service_replica_proto protoreflect.FileDescriptor
var File_github_com_Compogo_cluster_service_sync_proto protoreflect.FileDescriptor
var Replica_ServiceDesc = grpc.ServiceDesc{ ServiceName: "compogo.cluster.service.replica.Replica", HandlerType: (*ReplicaServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _Replica_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "github.com/Compogo/cluster/service/replica.proto", }
Replica_ServiceDesc is the grpc.ServiceDesc for Replica service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Sync_ServiceDesc = grpc.ServiceDesc{ ServiceName: "compogo.cluster.service.replica.Sync", HandlerType: (*SyncServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hosts", Handler: _Sync_Hosts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/Compogo/cluster/service/sync.proto", }
Sync_ServiceDesc is the grpc.ServiceDesc for Sync service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterElectionServer ¶
func RegisterElectionServer(s grpc.ServiceRegistrar, srv ElectionServer)
func RegisterReplicaServer ¶
func RegisterReplicaServer(s grpc.ServiceRegistrar, srv ReplicaServer)
func RegisterSyncServer ¶
func RegisterSyncServer(s grpc.ServiceRegistrar, srv SyncServer)
Types ¶
type ElectionClient ¶
type ElectionClient interface {
Election(ctx context.Context, in *model.Age, opts ...grpc.CallOption) (*emptypb.Empty, error)
Vote(ctx context.Context, in *model.Bulletin, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
ElectionClient is the client API for Election 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 NewElectionClient ¶
func NewElectionClient(cc grpc.ClientConnInterface) ElectionClient
type ElectionServer ¶
type ElectionServer interface {
Election(context.Context, *model.Age) (*emptypb.Empty, error)
Vote(context.Context, *model.Bulletin) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
ElectionServer is the server API for Election service. All implementations must embed UnimplementedElectionServer for forward compatibility.
type ReplicaClient ¶
type ReplicaClient interface {
Subscribe(ctx context.Context, in *model.Meta, opts ...grpc.CallOption) (grpc.ServerStreamingClient[model.Stream], error)
}
ReplicaClient is the client API for Replica 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 NewReplicaClient ¶
func NewReplicaClient(cc grpc.ClientConnInterface) ReplicaClient
type ReplicaServer ¶
type ReplicaServer interface {
Subscribe(*model.Meta, grpc.ServerStreamingServer[model.Stream]) error
// contains filtered or unexported methods
}
ReplicaServer is the server API for Replica service. All implementations must embed UnimplementedReplicaServer for forward compatibility.
type Replica_SubscribeClient ¶
type Replica_SubscribeClient = grpc.ServerStreamingClient[model.Stream]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Replica_SubscribeServer ¶
type Replica_SubscribeServer = grpc.ServerStreamingServer[model.Stream]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type SyncClient ¶
type SyncClient interface {
Hosts(ctx context.Context, in *model.Sync, opts ...grpc.CallOption) (*model.Sync, error)
}
SyncClient is the client API for Sync 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 NewSyncClient ¶
func NewSyncClient(cc grpc.ClientConnInterface) SyncClient
type SyncServer ¶
type SyncServer interface {
Hosts(context.Context, *model.Sync) (*model.Sync, error)
// contains filtered or unexported methods
}
SyncServer is the server API for Sync service. All implementations must embed UnimplementedSyncServer for forward compatibility.
type UnimplementedElectionServer ¶
type UnimplementedElectionServer struct{}
UnimplementedElectionServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnimplementedReplicaServer ¶
type UnimplementedReplicaServer struct{}
UnimplementedReplicaServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedReplicaServer) Subscribe ¶
func (UnimplementedReplicaServer) Subscribe(*model.Meta, grpc.ServerStreamingServer[model.Stream]) error
type UnimplementedSyncServer ¶
type UnimplementedSyncServer struct{}
UnimplementedSyncServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnsafeElectionServer ¶
type UnsafeElectionServer interface {
// contains filtered or unexported methods
}
UnsafeElectionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ElectionServer will result in compilation errors.
type UnsafeReplicaServer ¶
type UnsafeReplicaServer interface {
// contains filtered or unexported methods
}
UnsafeReplicaServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ReplicaServer will result in compilation errors.
type UnsafeSyncServer ¶
type UnsafeSyncServer interface {
// contains filtered or unexported methods
}
UnsafeSyncServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SyncServer will result in compilation errors.