Migrate to newer grpc utilities and bump deps (#593)

* Migrate to newer grpc utilities and bump deps

* Revert grpc back as it was an accidental tag
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-10-09 13:18:53 -04:00
1 parent 273cf29ba4
commit 7f00e61ab0
34 files changed
+4511 -4474

No files matched your search

@@ -7,13 +7,9 @@
package services
import (
context "context"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
servers "github.com/hashicorp/boundary/internal/servers"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -933,89 +929,3 @@ func file_controller_servers_services_v1_server_coordination_service_proto_init(
file_controller_servers_services_v1_server_coordination_service_proto_goTypes = nil
file_controller_servers_services_v1_server_coordination_service_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// ServerCoordinationServiceClient is the client API for ServerCoordinationService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ServerCoordinationServiceClient interface {
// Status gets worker status requests which include the ongoing jobs the worker is handling and
// returns the status response which includes the changes the controller would like to make to
// jobs as well as provide a list of the controllers in the system.
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}
type serverCoordinationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewServerCoordinationServiceClient(cc grpc.ClientConnInterface) ServerCoordinationServiceClient {
return &serverCoordinationServiceClient{cc}
}
func (c *serverCoordinationServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
out := new(StatusResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.ServerCoordinationService/Status", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ServerCoordinationServiceServer is the server API for ServerCoordinationService service.
type ServerCoordinationServiceServer interface {
// Status gets worker status requests which include the ongoing jobs the worker is handling and
// returns the status response which includes the changes the controller would like to make to
// jobs as well as provide a list of the controllers in the system.
Status(context.Context, *StatusRequest) (*StatusResponse, error)
}
// UnimplementedServerCoordinationServiceServer can be embedded to have forward compatible implementations.
type UnimplementedServerCoordinationServiceServer struct {
}
func (*UnimplementedServerCoordinationServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
}
func RegisterServerCoordinationServiceServer(s *grpc.Server, srv ServerCoordinationServiceServer) {
s.RegisterService(&_ServerCoordinationService_serviceDesc, srv)
}
func _ServerCoordinationService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServerCoordinationServiceServer).Status(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.ServerCoordinationService/Status",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServerCoordinationServiceServer).Status(ctx, req.(*StatusRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ServerCoordinationService_serviceDesc = grpc.ServiceDesc{
ServiceName: "controller.servers.services.v1.ServerCoordinationService",
HandlerType: (*ServerCoordinationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Status",
Handler: _ServerCoordinationService_Status_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "controller/servers/services/v1/server_coordination_service.proto",
}
@@ -0,0 +1,92 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package services
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.SupportPackageIsVersion6
// ServerCoordinationServiceClient is the client API for ServerCoordinationService 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 ServerCoordinationServiceClient interface {
// Status gets worker status requests which include the ongoing jobs the worker is handling and
// returns the status response which includes the changes the controller would like to make to
// jobs as well as provide a list of the controllers in the system.
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}
type serverCoordinationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewServerCoordinationServiceClient(cc grpc.ClientConnInterface) ServerCoordinationServiceClient {
return &serverCoordinationServiceClient{cc}
}
func (c *serverCoordinationServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
out := new(StatusResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.ServerCoordinationService/Status", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ServerCoordinationServiceServer is the server API for ServerCoordinationService service.
type ServerCoordinationServiceServer interface {
// Status gets worker status requests which include the ongoing jobs the worker is handling and
// returns the status response which includes the changes the controller would like to make to
// jobs as well as provide a list of the controllers in the system.
Status(context.Context, *StatusRequest) (*StatusResponse, error)
}
// UnimplementedServerCoordinationServiceServer can be embedded to have forward compatible implementations.
type UnimplementedServerCoordinationServiceServer struct {
}
func (*UnimplementedServerCoordinationServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
}
func RegisterServerCoordinationServiceServer(s *grpc.Server, srv ServerCoordinationServiceServer) {
s.RegisterService(&_ServerCoordinationService_serviceDesc, srv)
}
func _ServerCoordinationService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServerCoordinationServiceServer).Status(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.ServerCoordinationService/Status",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServerCoordinationServiceServer).Status(ctx, req.(*StatusRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ServerCoordinationService_serviceDesc = grpc.ServiceDesc{
ServiceName: "controller.servers.services.v1.ServerCoordinationService",
HandlerType: (*ServerCoordinationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Status",
Handler: _ServerCoordinationService_Status_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "controller/servers/services/v1/server_coordination_service.proto",
}
@@ -7,14 +7,10 @@
package services
import (
context "context"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
targets "github.com/hashicorp/boundary/internal/gen/controller/api/resources/targets"
_ "github.com/hashicorp/boundary/internal/servers"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -1240,239 +1236,3 @@ func file_controller_servers_services_v1_session_service_proto_init() {
file_controller_servers_services_v1_session_service_proto_goTypes = nil
file_controller_servers_services_v1_session_service_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// SessionServiceClient is the client API for SessionService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SessionServiceClient interface {
// GetSession allows a worker to retrieve session information from the
// controller.
LookupSession(ctx context.Context, in *LookupSessionRequest, opts ...grpc.CallOption) (*LookupSessionResponse, error)
// ActivateSession allows a worker to activate a session on a controller.
ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error)
// AuthorizeConnection allows a worker to activate a session on a controller.
AuthorizeConnection(ctx context.Context, in *AuthorizeConnectionRequest, opts ...grpc.CallOption) (*AuthorizeConnectionResponse, error)
// ConnectConnection updates a connection to set it to connected
ConnectConnection(ctx context.Context, in *ConnectConnectionRequest, opts ...grpc.CallOption) (*ConnectConnectionResponse, error)
// CloseConnections updates a connection to set it to closed
CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*CloseConnectionResponse, error)
}
type sessionServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient {
return &sessionServiceClient{cc}
}
func (c *sessionServiceClient) LookupSession(ctx context.Context, in *LookupSessionRequest, opts ...grpc.CallOption) (*LookupSessionResponse, error) {
out := new(LookupSessionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/LookupSession", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error) {
out := new(ActivateSessionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/ActivateSession", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) AuthorizeConnection(ctx context.Context, in *AuthorizeConnectionRequest, opts ...grpc.CallOption) (*AuthorizeConnectionResponse, error) {
out := new(AuthorizeConnectionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/AuthorizeConnection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) ConnectConnection(ctx context.Context, in *ConnectConnectionRequest, opts ...grpc.CallOption) (*ConnectConnectionResponse, error) {
out := new(ConnectConnectionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/ConnectConnection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*CloseConnectionResponse, error) {
out := new(CloseConnectionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/CloseConnection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SessionServiceServer is the server API for SessionService service.
type SessionServiceServer interface {
// GetSession allows a worker to retrieve session information from the
// controller.
LookupSession(context.Context, *LookupSessionRequest) (*LookupSessionResponse, error)
// ActivateSession allows a worker to activate a session on a controller.
ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error)
// AuthorizeConnection allows a worker to activate a session on a controller.
AuthorizeConnection(context.Context, *AuthorizeConnectionRequest) (*AuthorizeConnectionResponse, error)
// ConnectConnection updates a connection to set it to connected
ConnectConnection(context.Context, *ConnectConnectionRequest) (*ConnectConnectionResponse, error)
// CloseConnections updates a connection to set it to closed
CloseConnection(context.Context, *CloseConnectionRequest) (*CloseConnectionResponse, error)
}
// UnimplementedSessionServiceServer can be embedded to have forward compatible implementations.
type UnimplementedSessionServiceServer struct {
}
func (*UnimplementedSessionServiceServer) LookupSession(context.Context, *LookupSessionRequest) (*LookupSessionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LookupSession not implemented")
}
func (*UnimplementedSessionServiceServer) ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ActivateSession not implemented")
}
func (*UnimplementedSessionServiceServer) AuthorizeConnection(context.Context, *AuthorizeConnectionRequest) (*AuthorizeConnectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AuthorizeConnection not implemented")
}
func (*UnimplementedSessionServiceServer) ConnectConnection(context.Context, *ConnectConnectionRequest) (*ConnectConnectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ConnectConnection not implemented")
}
func (*UnimplementedSessionServiceServer) CloseConnection(context.Context, *CloseConnectionRequest) (*CloseConnectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CloseConnection not implemented")
}
func RegisterSessionServiceServer(s *grpc.Server, srv SessionServiceServer) {
s.RegisterService(&_SessionService_serviceDesc, srv)
}
func _SessionService_LookupSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LookupSessionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).LookupSession(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/LookupSession",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).LookupSession(ctx, req.(*LookupSessionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_ActivateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ActivateSessionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).ActivateSession(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/ActivateSession",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).ActivateSession(ctx, req.(*ActivateSessionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_AuthorizeConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AuthorizeConnectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).AuthorizeConnection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/AuthorizeConnection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).AuthorizeConnection(ctx, req.(*AuthorizeConnectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_ConnectConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConnectConnectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).ConnectConnection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/ConnectConnection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).ConnectConnection(ctx, req.(*ConnectConnectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_CloseConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CloseConnectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).CloseConnection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/CloseConnection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).CloseConnection(ctx, req.(*CloseConnectionRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SessionService_serviceDesc = grpc.ServiceDesc{
ServiceName: "controller.servers.services.v1.SessionService",
HandlerType: (*SessionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "LookupSession",
Handler: _SessionService_LookupSession_Handler,
},
{
MethodName: "ActivateSession",
Handler: _SessionService_ActivateSession_Handler,
},
{
MethodName: "AuthorizeConnection",
Handler: _SessionService_AuthorizeConnection_Handler,
},
{
MethodName: "ConnectConnection",
Handler: _SessionService_ConnectConnection_Handler,
},
{
MethodName: "CloseConnection",
Handler: _SessionService_CloseConnection_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "controller/servers/services/v1/session_service.proto",
}
@@ -0,0 +1,242 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package services
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.SupportPackageIsVersion6
// SessionServiceClient is the client API for SessionService 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 SessionServiceClient interface {
// GetSession allows a worker to retrieve session information from the
// controller.
LookupSession(ctx context.Context, in *LookupSessionRequest, opts ...grpc.CallOption) (*LookupSessionResponse, error)
// ActivateSession allows a worker to activate a session on a controller.
ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error)
// AuthorizeConnection allows a worker to activate a session on a controller.
AuthorizeConnection(ctx context.Context, in *AuthorizeConnectionRequest, opts ...grpc.CallOption) (*AuthorizeConnectionResponse, error)
// ConnectConnection updates a connection to set it to connected
ConnectConnection(ctx context.Context, in *ConnectConnectionRequest, opts ...grpc.CallOption) (*ConnectConnectionResponse, error)
// CloseConnections updates a connection to set it to closed
CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*CloseConnectionResponse, error)
}
type sessionServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient {
return &sessionServiceClient{cc}
}
func (c *sessionServiceClient) LookupSession(ctx context.Context, in *LookupSessionRequest, opts ...grpc.CallOption) (*LookupSessionResponse, error) {
out := new(LookupSessionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/LookupSession", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error) {
out := new(ActivateSessionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/ActivateSession", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) AuthorizeConnection(ctx context.Context, in *AuthorizeConnectionRequest, opts ...grpc.CallOption) (*AuthorizeConnectionResponse, error) {
out := new(AuthorizeConnectionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/AuthorizeConnection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) ConnectConnection(ctx context.Context, in *ConnectConnectionRequest, opts ...grpc.CallOption) (*ConnectConnectionResponse, error) {
out := new(ConnectConnectionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/ConnectConnection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*CloseConnectionResponse, error) {
out := new(CloseConnectionResponse)
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/CloseConnection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SessionServiceServer is the server API for SessionService service.
type SessionServiceServer interface {
// GetSession allows a worker to retrieve session information from the
// controller.
LookupSession(context.Context, *LookupSessionRequest) (*LookupSessionResponse, error)
// ActivateSession allows a worker to activate a session on a controller.
ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error)
// AuthorizeConnection allows a worker to activate a session on a controller.
AuthorizeConnection(context.Context, *AuthorizeConnectionRequest) (*AuthorizeConnectionResponse, error)
// ConnectConnection updates a connection to set it to connected
ConnectConnection(context.Context, *ConnectConnectionRequest) (*ConnectConnectionResponse, error)
// CloseConnections updates a connection to set it to closed
CloseConnection(context.Context, *CloseConnectionRequest) (*CloseConnectionResponse, error)
}
// UnimplementedSessionServiceServer can be embedded to have forward compatible implementations.
type UnimplementedSessionServiceServer struct {
}
func (*UnimplementedSessionServiceServer) LookupSession(context.Context, *LookupSessionRequest) (*LookupSessionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LookupSession not implemented")
}
func (*UnimplementedSessionServiceServer) ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ActivateSession not implemented")
}
func (*UnimplementedSessionServiceServer) AuthorizeConnection(context.Context, *AuthorizeConnectionRequest) (*AuthorizeConnectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AuthorizeConnection not implemented")
}
func (*UnimplementedSessionServiceServer) ConnectConnection(context.Context, *ConnectConnectionRequest) (*ConnectConnectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ConnectConnection not implemented")
}
func (*UnimplementedSessionServiceServer) CloseConnection(context.Context, *CloseConnectionRequest) (*CloseConnectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CloseConnection not implemented")
}
func RegisterSessionServiceServer(s *grpc.Server, srv SessionServiceServer) {
s.RegisterService(&_SessionService_serviceDesc, srv)
}
func _SessionService_LookupSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LookupSessionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).LookupSession(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/LookupSession",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).LookupSession(ctx, req.(*LookupSessionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_ActivateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ActivateSessionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).ActivateSession(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/ActivateSession",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).ActivateSession(ctx, req.(*ActivateSessionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_AuthorizeConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AuthorizeConnectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).AuthorizeConnection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/AuthorizeConnection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).AuthorizeConnection(ctx, req.(*AuthorizeConnectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_ConnectConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConnectConnectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).ConnectConnection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/ConnectConnection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).ConnectConnection(ctx, req.(*ConnectConnectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_CloseConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CloseConnectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).CloseConnection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/controller.servers.services.v1.SessionService/CloseConnection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).CloseConnection(ctx, req.(*CloseConnectionRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SessionService_serviceDesc = grpc.ServiceDesc{
ServiceName: "controller.servers.services.v1.SessionService",
HandlerType: (*SessionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "LookupSession",
Handler: _SessionService_LookupSession_Handler,
},
{
MethodName: "ActivateSession",
Handler: _SessionService_ActivateSession_Handler,
},
{
MethodName: "AuthorizeConnection",
Handler: _SessionService_AuthorizeConnection_Handler,
},
{
MethodName: "ConnectConnection",
Handler: _SessionService_ConnectConnection_Handler,
},
{
MethodName: "CloseConnection",
Handler: _SessionService_CloseConnection_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "controller/servers/services/v1/session_service.proto",
}