mirror of https://github.com/hashicorp/consul
221 lines
8.3 KiB
Go
221 lines
8.3 KiB
Go
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// - protoc-gen-go-grpc v1.2.0
|
||
|
// - protoc (unknown)
|
||
|
// source: private/pbstorage/raft.proto
|
||
|
|
||
|
package pbstorage
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
grpc "google.golang.org/grpc"
|
||
|
codes "google.golang.org/grpc/codes"
|
||
|
status "google.golang.org/grpc/status"
|
||
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||
|
)
|
||
|
|
||
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
// is compatible with the grpc package it is being compiled against.
|
||
|
// Requires gRPC-Go v1.32.0 or later.
|
||
|
const _ = grpc.SupportPackageIsVersion7
|
||
|
|
||
|
// ForwardingServiceClient is the client API for ForwardingService 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.
|
||
|
type ForwardingServiceClient interface {
|
||
|
// Write handles a forwarded write operation.
|
||
|
Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
|
||
|
// Delete handles a forwarded delete operation.
|
||
|
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||
|
// Read handles a forwarded read operation.
|
||
|
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
|
||
|
// List handles a forwarded list operation.
|
||
|
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
|
||
|
}
|
||
|
|
||
|
type forwardingServiceClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewForwardingServiceClient(cc grpc.ClientConnInterface) ForwardingServiceClient {
|
||
|
return &forwardingServiceClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *forwardingServiceClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) {
|
||
|
out := new(WriteResponse)
|
||
|
err := c.cc.Invoke(ctx, "/hashicorp.consul.internal.storage.raft.ForwardingService/Write", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *forwardingServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||
|
out := new(emptypb.Empty)
|
||
|
err := c.cc.Invoke(ctx, "/hashicorp.consul.internal.storage.raft.ForwardingService/Delete", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *forwardingServiceClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) {
|
||
|
out := new(ReadResponse)
|
||
|
err := c.cc.Invoke(ctx, "/hashicorp.consul.internal.storage.raft.ForwardingService/Read", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *forwardingServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
|
||
|
out := new(ListResponse)
|
||
|
err := c.cc.Invoke(ctx, "/hashicorp.consul.internal.storage.raft.ForwardingService/List", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// ForwardingServiceServer is the server API for ForwardingService service.
|
||
|
// All implementations should embed UnimplementedForwardingServiceServer
|
||
|
// for forward compatibility
|
||
|
type ForwardingServiceServer interface {
|
||
|
// Write handles a forwarded write operation.
|
||
|
Write(context.Context, *WriteRequest) (*WriteResponse, error)
|
||
|
// Delete handles a forwarded delete operation.
|
||
|
Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
|
||
|
// Read handles a forwarded read operation.
|
||
|
Read(context.Context, *ReadRequest) (*ReadResponse, error)
|
||
|
// List handles a forwarded list operation.
|
||
|
List(context.Context, *ListRequest) (*ListResponse, error)
|
||
|
}
|
||
|
|
||
|
// UnimplementedForwardingServiceServer should be embedded to have forward compatible implementations.
|
||
|
type UnimplementedForwardingServiceServer struct {
|
||
|
}
|
||
|
|
||
|
func (UnimplementedForwardingServiceServer) Write(context.Context, *WriteRequest) (*WriteResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Write not implemented")
|
||
|
}
|
||
|
func (UnimplementedForwardingServiceServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||
|
}
|
||
|
func (UnimplementedForwardingServiceServer) Read(context.Context, *ReadRequest) (*ReadResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented")
|
||
|
}
|
||
|
func (UnimplementedForwardingServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||
|
}
|
||
|
|
||
|
// UnsafeForwardingServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
|
// Use of this interface is not recommended, as added methods to ForwardingServiceServer will
|
||
|
// result in compilation errors.
|
||
|
type UnsafeForwardingServiceServer interface {
|
||
|
mustEmbedUnimplementedForwardingServiceServer()
|
||
|
}
|
||
|
|
||
|
func RegisterForwardingServiceServer(s grpc.ServiceRegistrar, srv ForwardingServiceServer) {
|
||
|
s.RegisterService(&ForwardingService_ServiceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _ForwardingService_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(WriteRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(ForwardingServiceServer).Write(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/hashicorp.consul.internal.storage.raft.ForwardingService/Write",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(ForwardingServiceServer).Write(ctx, req.(*WriteRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _ForwardingService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(DeleteRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(ForwardingServiceServer).Delete(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/hashicorp.consul.internal.storage.raft.ForwardingService/Delete",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(ForwardingServiceServer).Delete(ctx, req.(*DeleteRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _ForwardingService_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(ReadRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(ForwardingServiceServer).Read(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/hashicorp.consul.internal.storage.raft.ForwardingService/Read",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(ForwardingServiceServer).Read(ctx, req.(*ReadRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _ForwardingService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(ListRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(ForwardingServiceServer).List(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/hashicorp.consul.internal.storage.raft.ForwardingService/List",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(ForwardingServiceServer).List(ctx, req.(*ListRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
// ForwardingService_ServiceDesc is the grpc.ServiceDesc for ForwardingService service.
|
||
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
// and not to be introspected or modified (even as a copy)
|
||
|
var ForwardingService_ServiceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "hashicorp.consul.internal.storage.raft.ForwardingService",
|
||
|
HandlerType: (*ForwardingServiceServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "Write",
|
||
|
Handler: _ForwardingService_Write_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Delete",
|
||
|
Handler: _ForwardingService_Delete_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Read",
|
||
|
Handler: _ForwardingService_Read_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "List",
|
||
|
Handler: _ForwardingService_List_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "private/pbstorage/raft.proto",
|
||
|
}
|