2017-05-24 13:34:59 +00:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2016-08-19 15:49:25 +00:00
|
|
|
// source: request_forwarding_service.proto
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2017-10-23 21:45:05 +00:00
|
|
|
// 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
|
|
|
|
|
2017-05-24 19:06:56 +00:00
|
|
|
type EchoRequest struct {
|
2017-10-23 18:59:37 +00:00
|
|
|
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
|
2017-05-24 19:06:56 +00:00
|
|
|
ClusterAddr string `protobuf:"bytes,2,opt,name=cluster_addr,json=clusterAddr" json:"cluster_addr,omitempty"`
|
2017-10-23 18:59:37 +00:00
|
|
|
// ClusterAddrs is used to send up a list of cluster addresses to a dr
|
|
|
|
// primary from a dr secondary
|
2018-05-03 19:38:53 +00:00
|
|
|
ClusterAddrs []string `protobuf:"bytes,3,rep,name=cluster_addrs,json=clusterAddrs" json:"cluster_addrs,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *EchoRequest) Reset() { *m = EchoRequest{} }
|
|
|
|
func (m *EchoRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*EchoRequest) ProtoMessage() {}
|
|
|
|
func (*EchoRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_request_forwarding_service_1258ceaeca6e374d, []int{0}
|
|
|
|
}
|
|
|
|
func (m *EchoRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_EchoRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_EchoRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *EchoRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_EchoRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *EchoRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_EchoRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *EchoRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_EchoRequest.DiscardUnknown(m)
|
2017-05-24 19:06:56 +00:00
|
|
|
}
|
|
|
|
|
2018-05-03 19:38:53 +00:00
|
|
|
var xxx_messageInfo_EchoRequest proto.InternalMessageInfo
|
2017-05-24 19:06:56 +00:00
|
|
|
|
|
|
|
func (m *EchoRequest) GetMessage() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Message
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *EchoRequest) GetClusterAddr() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.ClusterAddr
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-10-23 18:59:37 +00:00
|
|
|
func (m *EchoRequest) GetClusterAddrs() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.ClusterAddrs
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-05-24 19:06:56 +00:00
|
|
|
type EchoReply struct {
|
2018-05-03 19:38:53 +00:00
|
|
|
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"`
|
|
|
|
ReplicationState uint32 `protobuf:"varint,3,opt,name=replication_state,json=replicationState" json:"replication_state,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2017-05-24 19:06:56 +00:00
|
|
|
}
|
|
|
|
|
2018-05-03 19:38:53 +00:00
|
|
|
func (m *EchoReply) Reset() { *m = EchoReply{} }
|
|
|
|
func (m *EchoReply) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*EchoReply) ProtoMessage() {}
|
|
|
|
func (*EchoReply) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_request_forwarding_service_1258ceaeca6e374d, []int{1}
|
|
|
|
}
|
|
|
|
func (m *EchoReply) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_EchoReply.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *EchoReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_EchoReply.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *EchoReply) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_EchoReply.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *EchoReply) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_EchoReply.Size(m)
|
|
|
|
}
|
|
|
|
func (m *EchoReply) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_EchoReply.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_EchoReply proto.InternalMessageInfo
|
2017-05-24 19:06:56 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2018-01-18 03:17:47 +00:00
|
|
|
func (m *EchoReply) GetReplicationState() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ReplicationState
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2017-05-24 19:06:56 +00:00
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*EchoRequest)(nil), "vault.EchoRequest")
|
|
|
|
proto.RegisterType((*EchoReply)(nil), "vault.EchoReply")
|
|
|
|
}
|
|
|
|
|
2016-08-19 15:49:25 +00:00
|
|
|
// 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.
|
2016-11-17 15:06:26 +00:00
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
2016-08-19 15:49:25 +00:00
|
|
|
|
2018-05-29 22:23:51 +00:00
|
|
|
// RequestForwardingClient is the client API for RequestForwarding service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
2016-08-19 15:49:25 +00:00
|
|
|
type RequestForwardingClient interface {
|
2017-01-06 22:08:43 +00:00
|
|
|
ForwardRequest(ctx context.Context, in *forwarding.Request, opts ...grpc.CallOption) (*forwarding.Response, error)
|
2017-05-24 19:06:56 +00:00
|
|
|
Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error)
|
2016-08-19 15:49:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type requestForwardingClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewRequestForwardingClient(cc *grpc.ClientConn) RequestForwardingClient {
|
|
|
|
return &requestForwardingClient{cc}
|
|
|
|
}
|
|
|
|
|
2017-01-06 22:08:43 +00:00
|
|
|
func (c *requestForwardingClient) ForwardRequest(ctx context.Context, in *forwarding.Request, opts ...grpc.CallOption) (*forwarding.Response, error) {
|
2016-08-19 15:49:25 +00:00
|
|
|
out := new(forwarding.Response)
|
2018-05-29 22:23:51 +00:00
|
|
|
err := c.cc.Invoke(ctx, "/vault.RequestForwarding/ForwardRequest", in, out, opts...)
|
2016-08-19 15:49:25 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-05-24 19:06:56 +00:00
|
|
|
func (c *requestForwardingClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error) {
|
|
|
|
out := new(EchoReply)
|
2018-05-29 22:23:51 +00:00
|
|
|
err := c.cc.Invoke(ctx, "/vault.RequestForwarding/Echo", in, out, opts...)
|
2017-05-24 19:06:56 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-05-29 22:23:51 +00:00
|
|
|
// RequestForwardingServer is the server API for RequestForwarding service.
|
2016-08-19 15:49:25 +00:00
|
|
|
type RequestForwardingServer interface {
|
2017-01-06 22:08:43 +00:00
|
|
|
ForwardRequest(context.Context, *forwarding.Request) (*forwarding.Response, error)
|
2017-05-24 19:06:56 +00:00
|
|
|
Echo(context.Context, *EchoRequest) (*EchoReply, error)
|
2016-08-19 15:49:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterRequestForwardingServer(s *grpc.Server, srv RequestForwardingServer) {
|
|
|
|
s.RegisterService(&_RequestForwarding_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
2017-01-06 22:08:43 +00:00
|
|
|
func _RequestForwarding_ForwardRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
2016-08-19 15:49:25 +00:00
|
|
|
in := new(forwarding.Request)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
2017-01-06 22:08:43 +00:00
|
|
|
return srv.(RequestForwardingServer).ForwardRequest(ctx, in)
|
2016-08-19 15:49:25 +00:00
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-01-06 22:08:43 +00:00
|
|
|
FullMethod: "/vault.RequestForwarding/ForwardRequest",
|
2016-08-19 15:49:25 +00:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2017-01-06 22:08:43 +00:00
|
|
|
return srv.(RequestForwardingServer).ForwardRequest(ctx, req.(*forwarding.Request))
|
2016-08-19 15:49:25 +00:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-05-24 19:06:56 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2016-08-19 15:49:25 +00:00
|
|
|
var _RequestForwarding_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "vault.RequestForwarding",
|
|
|
|
HandlerType: (*RequestForwardingServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
2017-01-06 22:08:43 +00:00
|
|
|
MethodName: "ForwardRequest",
|
|
|
|
Handler: _RequestForwarding_ForwardRequest_Handler,
|
2016-08-19 15:49:25 +00:00
|
|
|
},
|
2017-05-24 19:06:56 +00:00
|
|
|
{
|
|
|
|
MethodName: "Echo",
|
|
|
|
Handler: _RequestForwarding_Echo_Handler,
|
|
|
|
},
|
2016-08-19 15:49:25 +00:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
2016-11-17 15:06:26 +00:00
|
|
|
Metadata: "request_forwarding_service.proto",
|
2016-08-19 15:49:25 +00:00
|
|
|
}
|
|
|
|
|
2018-05-03 19:38:53 +00:00
|
|
|
func init() {
|
|
|
|
proto.RegisterFile("request_forwarding_service.proto", fileDescriptor_request_forwarding_service_1258ceaeca6e374d)
|
|
|
|
}
|
2017-10-23 18:59:37 +00:00
|
|
|
|
2018-05-03 19:38:53 +00:00
|
|
|
var fileDescriptor_request_forwarding_service_1258ceaeca6e374d = []byte{
|
2018-01-18 03:17:47 +00:00
|
|
|
// 287 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbf, 0x4e, 0xc3, 0x30,
|
|
|
|
0x10, 0xc6, 0x9b, 0x96, 0x3f, 0xaa, 0xdb, 0xa2, 0xd6, 0x30, 0x44, 0x99, 0x42, 0x58, 0x22, 0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