229 lines
8.0 KiB
Go
229 lines
8.0 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: request_forwarding_service.proto
|
|
|
|
/*
|
|
Package vault is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
request_forwarding_service.proto
|
|
|
|
It has these top-level messages:
|
|
EchoRequest
|
|
EchoReply
|
|
*/
|
|
package vault
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import forwarding "github.com/hashicorp/vault/helper/forwarding"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type EchoRequest struct {
|
|
Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
|
|
// ClusterAddr is used to send up a standby node's address to the active
|
|
// node upon heartbeat
|
|
ClusterAddr string `protobuf:"bytes,2,opt,name=cluster_addr,json=clusterAddr" json:"cluster_addr,omitempty"`
|
|
// ClusterAddrs is used to send up a list of cluster addresses to a dr
|
|
// primary from a dr secondary
|
|
ClusterAddrs []string `protobuf:"bytes,3,rep,name=cluster_addrs,json=clusterAddrs" json:"cluster_addrs,omitempty"`
|
|
}
|
|
|
|
func (m *EchoRequest) Reset() { *m = EchoRequest{} }
|
|
func (m *EchoRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*EchoRequest) ProtoMessage() {}
|
|
func (*EchoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *EchoRequest) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *EchoRequest) GetClusterAddr() string {
|
|
if m != nil {
|
|
return m.ClusterAddr
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *EchoRequest) GetClusterAddrs() []string {
|
|
if m != nil {
|
|
return m.ClusterAddrs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type EchoReply struct {
|
|
Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
|
|
ClusterAddrs []string `protobuf:"bytes,2,rep,name=cluster_addrs,json=clusterAddrs" json:"cluster_addrs,omitempty"`
|
|
}
|
|
|
|
func (m *EchoReply) Reset() { *m = EchoReply{} }
|
|
func (m *EchoReply) String() string { return proto.CompactTextString(m) }
|
|
func (*EchoReply) ProtoMessage() {}
|
|
func (*EchoReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
func (m *EchoReply) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *EchoReply) GetClusterAddrs() []string {
|
|
if m != nil {
|
|
return m.ClusterAddrs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*EchoRequest)(nil), "vault.EchoRequest")
|
|
proto.RegisterType((*EchoReply)(nil), "vault.EchoReply")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for RequestForwarding service
|
|
|
|
type RequestForwardingClient interface {
|
|
ForwardRequest(ctx context.Context, in *forwarding.Request, opts ...grpc.CallOption) (*forwarding.Response, error)
|
|
Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error)
|
|
}
|
|
|
|
type requestForwardingClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewRequestForwardingClient(cc *grpc.ClientConn) RequestForwardingClient {
|
|
return &requestForwardingClient{cc}
|
|
}
|
|
|
|
func (c *requestForwardingClient) ForwardRequest(ctx context.Context, in *forwarding.Request, opts ...grpc.CallOption) (*forwarding.Response, error) {
|
|
out := new(forwarding.Response)
|
|
err := grpc.Invoke(ctx, "/vault.RequestForwarding/ForwardRequest", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *requestForwardingClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error) {
|
|
out := new(EchoReply)
|
|
err := grpc.Invoke(ctx, "/vault.RequestForwarding/Echo", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for RequestForwarding service
|
|
|
|
type RequestForwardingServer interface {
|
|
ForwardRequest(context.Context, *forwarding.Request) (*forwarding.Response, error)
|
|
Echo(context.Context, *EchoRequest) (*EchoReply, error)
|
|
}
|
|
|
|
func RegisterRequestForwardingServer(s *grpc.Server, srv RequestForwardingServer) {
|
|
s.RegisterService(&_RequestForwarding_serviceDesc, srv)
|
|
}
|
|
|
|
func _RequestForwarding_ForwardRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(forwarding.Request)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RequestForwardingServer).ForwardRequest(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/vault.RequestForwarding/ForwardRequest",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RequestForwardingServer).ForwardRequest(ctx, req.(*forwarding.Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _RequestForwarding_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EchoRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RequestForwardingServer).Echo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/vault.RequestForwarding/Echo",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RequestForwardingServer).Echo(ctx, req.(*EchoRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _RequestForwarding_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "vault.RequestForwarding",
|
|
HandlerType: (*RequestForwardingServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ForwardRequest",
|
|
Handler: _RequestForwarding_ForwardRequest_Handler,
|
|
},
|
|
{
|
|
MethodName: "Echo",
|
|
Handler: _RequestForwarding_Echo_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "request_forwarding_service.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("request_forwarding_service.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 261 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x3f, 0x4f, 0xc3, 0x30,
|
|
0x10, 0xc5, 0x9b, 0x96, 0x3f, 0x8a, 0x5b, 0x10, 0x18, 0x86, 0x28, 0x53, 0x08, 0x4b, 0x27, 0x47,
|
|
0x82, 0x85, 0x85, 0x81, 0x01, 0x06, 0xc6, 0x7c, 0x81, 0x28, 0xb5, 0x8f, 0x38, 0x92, 0x5b, 0x9b,
|
|
0x3b, 0xa7, 0x28, 0x2b, 0x9f, 0x1c, 0x91, 0xa4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