From ea3a092db8801270de4731b9b1d8fbae414bdca6 Mon Sep 17 00:00:00 2001 From: Sunny Gupta Date: Tue, 20 Mar 2018 13:07:42 -0700 Subject: [PATCH] Turns out mixer_codegen was not including the generated gRPC service block. Fixed (#4396) --- bin/mixer_codegen.sh | 2 +- .../template_handler_service.pb.go | 82 ++++++++++++++++++- .../apikey/template_handler_service.pb.go | 82 ++++++++++++++++++- .../template_handler_service.pb.go | 82 ++++++++++++++++++- .../template_handler_service.pb.go | 82 ++++++++++++++++++- .../listentry/template_handler_service.pb.go | 82 ++++++++++++++++++- .../logentry/template_handler_service.pb.go | 82 ++++++++++++++++++- .../metric/template_handler_service.pb.go | 82 ++++++++++++++++++- .../quota/template_handler_service.pb.go | 80 ++++++++++++++++++ .../template_handler_service.pb.go | 82 ++++++++++++++++++- .../CheckTesterTemplate_handler_service.pb.go | 82 ++++++++++++++++++- .../QuotaTesterTemplate_handler_service.pb.go | 80 ++++++++++++++++++ ...ReportTesterTemplate_handler_service.pb.go | 82 ++++++++++++++++++- .../tracespan/tracespan_handler_service.pb.go | 82 ++++++++++++++++++- .../template/check/tmpl_handler_service.pb.go | 82 ++++++++++++++++++- .../report/reporttmpl_handler_service.pb.go | 82 ++++++++++++++++++- 16 files changed, 1214 insertions(+), 14 deletions(-) diff --git a/bin/mixer_codegen.sh b/bin/mixer_codegen.sh index 60a9e9114dfa..f13f87f58b95 100755 --- a/bin/mixer_codegen.sh +++ b/bin/mixer_codegen.sh @@ -155,7 +155,7 @@ if [ "$opttemplate" = true ]; then TMPL_PROTOC_MAPPING+="M${i/:/=}," done - TMPL_PLUGIN="--plugin=$ROOT/bin/protoc-gen-gogoslick-$GOGO_VERSION --gogoslick-${GOGO_VERSION}_out=$TMPL_PROTOC_MAPPING:" + TMPL_PLUGIN="--plugin=$ROOT/bin/protoc-gen-gogoslick-$GOGO_VERSION --gogoslick-${GOGO_VERSION}_out=plugins=grpc,$TMPL_PROTOC_MAPPING:" TMPL_PLUGIN+=$outdir descriptor_set="_proto.descriptor_set" diff --git a/mixer/adapter/servicecontrol/template/servicecontrolreport/template_handler_service.pb.go b/mixer/adapter/servicecontrol/template/servicecontrolreport/template_handler_service.pb.go index 8592ca70816f..d1ef31062817 100644 --- a/mixer/adapter/servicecontrol/template/servicecontrolreport/template_handler_service.pb.go +++ b/mixer/adapter/servicecontrol/template/servicecontrolreport/template_handler_service.pb.go @@ -51,9 +51,14 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import strings "strings" import reflect "reflect" @@ -155,6 +160,81 @@ func init() { proto.RegisterType((*Type)(nil), "servicecontrolreport.Type") proto.RegisterType((*InstanceParam)(nil), "servicecontrolreport.InstanceParam") } + +// 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 HandleServicecontrolReportService service + +type HandleServicecontrolReportServiceClient interface { + // HandleServicecontrolReport is called by Mixer at request-time to deliver 'servicecontrolreport' instances to the backend. + HandleServicecontrolReport(ctx context.Context, in *HandleServicecontrolReportRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +type handleServicecontrolReportServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleServicecontrolReportServiceClient(cc *grpc.ClientConn) HandleServicecontrolReportServiceClient { + return &handleServicecontrolReportServiceClient{cc} +} + +func (c *handleServicecontrolReportServiceClient) HandleServicecontrolReport(ctx context.Context, in *HandleServicecontrolReportRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.ReportResult) + err := grpc.Invoke(ctx, "/servicecontrolreport.HandleServicecontrolReportService/HandleServicecontrolReport", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleServicecontrolReportService service + +type HandleServicecontrolReportServiceServer interface { + // HandleServicecontrolReport is called by Mixer at request-time to deliver 'servicecontrolreport' instances to the backend. + HandleServicecontrolReport(context.Context, *HandleServicecontrolReportRequest) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +func RegisterHandleServicecontrolReportServiceServer(s *grpc.Server, srv HandleServicecontrolReportServiceServer) { + s.RegisterService(&_HandleServicecontrolReportService_serviceDesc, srv) +} + +func _HandleServicecontrolReportService_HandleServicecontrolReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleServicecontrolReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleServicecontrolReportServiceServer).HandleServicecontrolReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/servicecontrolreport.HandleServicecontrolReportService/HandleServicecontrolReport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleServicecontrolReportServiceServer).HandleServicecontrolReport(ctx, req.(*HandleServicecontrolReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleServicecontrolReportService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "servicecontrolreport.HandleServicecontrolReportService", + HandlerType: (*HandleServicecontrolReportServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleServicecontrolReport", + Handler: _HandleServicecontrolReportService_HandleServicecontrolReport_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/adapter/servicecontrol/template/servicecontrolreport/template_handler_service.proto", +} + func (m *HandleServicecontrolReportRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/apikey/template_handler_service.pb.go b/mixer/template/apikey/template_handler_service.pb.go index 272f8c51a5c3..3198ad86f312 100644 --- a/mixer/template/apikey/template_handler_service.pb.go +++ b/mixer/template/apikey/template_handler_service.pb.go @@ -41,9 +41,14 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import strings "strings" import reflect "reflect" @@ -139,6 +144,81 @@ func init() { proto.RegisterType((*Type)(nil), "apikey.Type") proto.RegisterType((*InstanceParam)(nil), "apikey.InstanceParam") } + +// 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 HandleApiKeyService service + +type HandleApiKeyServiceClient interface { + // HandleApiKey is called by Mixer at request-time to deliver 'apikey' instances to the backend. + HandleApiKey(ctx context.Context, in *HandleApiKeyRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +type handleApiKeyServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleApiKeyServiceClient(cc *grpc.ClientConn) HandleApiKeyServiceClient { + return &handleApiKeyServiceClient{cc} +} + +func (c *handleApiKeyServiceClient) HandleApiKey(ctx context.Context, in *HandleApiKeyRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.CheckResult) + err := grpc.Invoke(ctx, "/apikey.HandleApiKeyService/HandleApiKey", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleApiKeyService service + +type HandleApiKeyServiceServer interface { + // HandleApiKey is called by Mixer at request-time to deliver 'apikey' instances to the backend. + HandleApiKey(context.Context, *HandleApiKeyRequest) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +func RegisterHandleApiKeyServiceServer(s *grpc.Server, srv HandleApiKeyServiceServer) { + s.RegisterService(&_HandleApiKeyService_serviceDesc, srv) +} + +func _HandleApiKeyService_HandleApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleApiKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleApiKeyServiceServer).HandleApiKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/apikey.HandleApiKeyService/HandleApiKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleApiKeyServiceServer).HandleApiKey(ctx, req.(*HandleApiKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleApiKeyService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "apikey.HandleApiKeyService", + HandlerType: (*HandleApiKeyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleApiKey", + Handler: _HandleApiKeyService_HandleApiKey_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/apikey/template_handler_service.proto", +} + func (m *HandleApiKeyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/authorization/template_handler_service.pb.go b/mixer/template/authorization/template_handler_service.pb.go index eda313d97017..3b6fcf2295d7 100644 --- a/mixer/template/authorization/template_handler_service.pb.go +++ b/mixer/template/authorization/template_handler_service.pb.go @@ -61,10 +61,15 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" @@ -261,6 +266,81 @@ func init() { proto.RegisterType((*SubjectInstanceParam)(nil), "authorization.SubjectInstanceParam") proto.RegisterType((*ActionInstanceParam)(nil), "authorization.ActionInstanceParam") } + +// 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 HandleAuthorizationService service + +type HandleAuthorizationServiceClient interface { + // HandleAuthorization is called by Mixer at request-time to deliver 'authorization' instances to the backend. + HandleAuthorization(ctx context.Context, in *HandleAuthorizationRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +type handleAuthorizationServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleAuthorizationServiceClient(cc *grpc.ClientConn) HandleAuthorizationServiceClient { + return &handleAuthorizationServiceClient{cc} +} + +func (c *handleAuthorizationServiceClient) HandleAuthorization(ctx context.Context, in *HandleAuthorizationRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.CheckResult) + err := grpc.Invoke(ctx, "/authorization.HandleAuthorizationService/HandleAuthorization", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleAuthorizationService service + +type HandleAuthorizationServiceServer interface { + // HandleAuthorization is called by Mixer at request-time to deliver 'authorization' instances to the backend. + HandleAuthorization(context.Context, *HandleAuthorizationRequest) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +func RegisterHandleAuthorizationServiceServer(s *grpc.Server, srv HandleAuthorizationServiceServer) { + s.RegisterService(&_HandleAuthorizationService_serviceDesc, srv) +} + +func _HandleAuthorizationService_HandleAuthorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleAuthorizationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleAuthorizationServiceServer).HandleAuthorization(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/authorization.HandleAuthorizationService/HandleAuthorization", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleAuthorizationServiceServer).HandleAuthorization(ctx, req.(*HandleAuthorizationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleAuthorizationService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "authorization.HandleAuthorizationService", + HandlerType: (*HandleAuthorizationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleAuthorization", + Handler: _HandleAuthorizationService_HandleAuthorization_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/authorization/template_handler_service.proto", +} + func (m *HandleAuthorizationRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/checknothing/template_handler_service.pb.go b/mixer/template/checknothing/template_handler_service.pb.go index cb28ceb672f3..06a0b3b82573 100644 --- a/mixer/template/checknothing/template_handler_service.pb.go +++ b/mixer/template/checknothing/template_handler_service.pb.go @@ -38,7 +38,12 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) import strings "strings" import reflect "reflect" @@ -115,6 +120,81 @@ func init() { proto.RegisterType((*Type)(nil), "checknothing.Type") proto.RegisterType((*InstanceParam)(nil), "checknothing.InstanceParam") } + +// 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 HandleCheckNothingService service + +type HandleCheckNothingServiceClient interface { + // HandleCheckNothing is called by Mixer at request-time to deliver 'checknothing' instances to the backend. + HandleCheckNothing(ctx context.Context, in *HandleCheckNothingRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +type handleCheckNothingServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleCheckNothingServiceClient(cc *grpc.ClientConn) HandleCheckNothingServiceClient { + return &handleCheckNothingServiceClient{cc} +} + +func (c *handleCheckNothingServiceClient) HandleCheckNothing(ctx context.Context, in *HandleCheckNothingRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.CheckResult) + err := grpc.Invoke(ctx, "/checknothing.HandleCheckNothingService/HandleCheckNothing", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleCheckNothingService service + +type HandleCheckNothingServiceServer interface { + // HandleCheckNothing is called by Mixer at request-time to deliver 'checknothing' instances to the backend. + HandleCheckNothing(context.Context, *HandleCheckNothingRequest) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +func RegisterHandleCheckNothingServiceServer(s *grpc.Server, srv HandleCheckNothingServiceServer) { + s.RegisterService(&_HandleCheckNothingService_serviceDesc, srv) +} + +func _HandleCheckNothingService_HandleCheckNothing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleCheckNothingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleCheckNothingServiceServer).HandleCheckNothing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/checknothing.HandleCheckNothingService/HandleCheckNothing", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleCheckNothingServiceServer).HandleCheckNothing(ctx, req.(*HandleCheckNothingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleCheckNothingService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "checknothing.HandleCheckNothingService", + HandlerType: (*HandleCheckNothingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleCheckNothing", + Handler: _HandleCheckNothingService_HandleCheckNothing_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/checknothing/template_handler_service.proto", +} + func (m *HandleCheckNothingRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/listentry/template_handler_service.pb.go b/mixer/template/listentry/template_handler_service.pb.go index 9b641854e222..a4818431848e 100644 --- a/mixer/template/listentry/template_handler_service.pb.go +++ b/mixer/template/listentry/template_handler_service.pb.go @@ -42,7 +42,12 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) import strings "strings" import reflect "reflect" @@ -123,6 +128,81 @@ func init() { proto.RegisterType((*Type)(nil), "listentry.Type") proto.RegisterType((*InstanceParam)(nil), "listentry.InstanceParam") } + +// 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 HandleListEntryService service + +type HandleListEntryServiceClient interface { + // HandleListEntry is called by Mixer at request-time to deliver 'listentry' instances to the backend. + HandleListEntry(ctx context.Context, in *HandleListEntryRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +type handleListEntryServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleListEntryServiceClient(cc *grpc.ClientConn) HandleListEntryServiceClient { + return &handleListEntryServiceClient{cc} +} + +func (c *handleListEntryServiceClient) HandleListEntry(ctx context.Context, in *HandleListEntryRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.CheckResult) + err := grpc.Invoke(ctx, "/listentry.HandleListEntryService/HandleListEntry", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleListEntryService service + +type HandleListEntryServiceServer interface { + // HandleListEntry is called by Mixer at request-time to deliver 'listentry' instances to the backend. + HandleListEntry(context.Context, *HandleListEntryRequest) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +func RegisterHandleListEntryServiceServer(s *grpc.Server, srv HandleListEntryServiceServer) { + s.RegisterService(&_HandleListEntryService_serviceDesc, srv) +} + +func _HandleListEntryService_HandleListEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleListEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleListEntryServiceServer).HandleListEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/listentry.HandleListEntryService/HandleListEntry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleListEntryServiceServer).HandleListEntry(ctx, req.(*HandleListEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleListEntryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "listentry.HandleListEntryService", + HandlerType: (*HandleListEntryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleListEntry", + Handler: _HandleListEntryService_HandleListEntry_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/listentry/template_handler_service.proto", +} + func (m *HandleListEntryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/logentry/template_handler_service.pb.go b/mixer/template/logentry/template_handler_service.pb.go index 84e7e6d47ddb..c01ff9dbc63c 100644 --- a/mixer/template/logentry/template_handler_service.pb.go +++ b/mixer/template/logentry/template_handler_service.pb.go @@ -53,10 +53,15 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" @@ -167,6 +172,81 @@ func init() { proto.RegisterType((*Type)(nil), "logentry.Type") proto.RegisterType((*InstanceParam)(nil), "logentry.InstanceParam") } + +// 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 HandleLogEntryService service + +type HandleLogEntryServiceClient interface { + // HandleLogEntry is called by Mixer at request-time to deliver 'logentry' instances to the backend. + HandleLogEntry(ctx context.Context, in *HandleLogEntryRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +type handleLogEntryServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleLogEntryServiceClient(cc *grpc.ClientConn) HandleLogEntryServiceClient { + return &handleLogEntryServiceClient{cc} +} + +func (c *handleLogEntryServiceClient) HandleLogEntry(ctx context.Context, in *HandleLogEntryRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.ReportResult) + err := grpc.Invoke(ctx, "/logentry.HandleLogEntryService/HandleLogEntry", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleLogEntryService service + +type HandleLogEntryServiceServer interface { + // HandleLogEntry is called by Mixer at request-time to deliver 'logentry' instances to the backend. + HandleLogEntry(context.Context, *HandleLogEntryRequest) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +func RegisterHandleLogEntryServiceServer(s *grpc.Server, srv HandleLogEntryServiceServer) { + s.RegisterService(&_HandleLogEntryService_serviceDesc, srv) +} + +func _HandleLogEntryService_HandleLogEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleLogEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleLogEntryServiceServer).HandleLogEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/logentry.HandleLogEntryService/HandleLogEntry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleLogEntryServiceServer).HandleLogEntry(ctx, req.(*HandleLogEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleLogEntryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "logentry.HandleLogEntryService", + HandlerType: (*HandleLogEntryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleLogEntry", + Handler: _HandleLogEntryService_HandleLogEntry_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/logentry/template_handler_service.proto", +} + func (m *HandleLogEntryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/metric/template_handler_service.pb.go b/mixer/template/metric/template_handler_service.pb.go index ce699576c417..72a494151e58 100644 --- a/mixer/template/metric/template_handler_service.pb.go +++ b/mixer/template/metric/template_handler_service.pb.go @@ -48,10 +48,15 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" @@ -160,6 +165,81 @@ func init() { proto.RegisterType((*Type)(nil), "metric.Type") proto.RegisterType((*InstanceParam)(nil), "metric.InstanceParam") } + +// 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 HandleMetricService service + +type HandleMetricServiceClient interface { + // HandleMetric is called by Mixer at request-time to deliver 'metric' instances to the backend. + HandleMetric(ctx context.Context, in *HandleMetricRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +type handleMetricServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleMetricServiceClient(cc *grpc.ClientConn) HandleMetricServiceClient { + return &handleMetricServiceClient{cc} +} + +func (c *handleMetricServiceClient) HandleMetric(ctx context.Context, in *HandleMetricRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.ReportResult) + err := grpc.Invoke(ctx, "/metric.HandleMetricService/HandleMetric", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleMetricService service + +type HandleMetricServiceServer interface { + // HandleMetric is called by Mixer at request-time to deliver 'metric' instances to the backend. + HandleMetric(context.Context, *HandleMetricRequest) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +func RegisterHandleMetricServiceServer(s *grpc.Server, srv HandleMetricServiceServer) { + s.RegisterService(&_HandleMetricService_serviceDesc, srv) +} + +func _HandleMetricService_HandleMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleMetricServiceServer).HandleMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/metric.HandleMetricService/HandleMetric", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleMetricServiceServer).HandleMetric(ctx, req.(*HandleMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleMetricService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "metric.HandleMetricService", + HandlerType: (*HandleMetricServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleMetric", + Handler: _HandleMetricService_HandleMetric_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/metric/template_handler_service.proto", +} + func (m *HandleMetricRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/quota/template_handler_service.pb.go b/mixer/template/quota/template_handler_service.pb.go index 6aa2d137219d..3980fa590218 100644 --- a/mixer/template/quota/template_handler_service.pb.go +++ b/mixer/template/quota/template_handler_service.pb.go @@ -48,6 +48,11 @@ import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1be import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" @@ -132,6 +137,81 @@ func init() { proto.RegisterType((*Type)(nil), "quota.Type") proto.RegisterType((*InstanceParam)(nil), "quota.InstanceParam") } + +// 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 HandleQuotaService service + +type HandleQuotaServiceClient interface { + // HandleQuota is called by Mixer at request-time to deliver 'quota' instances to the backend. + HandleQuota(ctx context.Context, in *HandleQuotaRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.QuotaResult, error) +} + +type handleQuotaServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleQuotaServiceClient(cc *grpc.ClientConn) HandleQuotaServiceClient { + return &handleQuotaServiceClient{cc} +} + +func (c *handleQuotaServiceClient) HandleQuota(ctx context.Context, in *HandleQuotaRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.QuotaResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.QuotaResult) + err := grpc.Invoke(ctx, "/quota.HandleQuotaService/HandleQuota", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleQuotaService service + +type HandleQuotaServiceServer interface { + // HandleQuota is called by Mixer at request-time to deliver 'quota' instances to the backend. + HandleQuota(context.Context, *HandleQuotaRequest) (*istio_mixer_adapter_model_v1beta11.QuotaResult, error) +} + +func RegisterHandleQuotaServiceServer(s *grpc.Server, srv HandleQuotaServiceServer) { + s.RegisterService(&_HandleQuotaService_serviceDesc, srv) +} + +func _HandleQuotaService_HandleQuota_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleQuotaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleQuotaServiceServer).HandleQuota(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/quota.HandleQuotaService/HandleQuota", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleQuotaServiceServer).HandleQuota(ctx, req.(*HandleQuotaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleQuotaService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "quota.HandleQuotaService", + HandlerType: (*HandleQuotaServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleQuota", + Handler: _HandleQuotaService_HandleQuota_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/quota/template_handler_service.proto", +} + func (m *HandleQuotaRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/reportnothing/template_handler_service.pb.go b/mixer/template/reportnothing/template_handler_service.pb.go index 2769ec9bffc3..4799b8b930b0 100644 --- a/mixer/template/reportnothing/template_handler_service.pb.go +++ b/mixer/template/reportnothing/template_handler_service.pb.go @@ -38,7 +38,12 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) import strings "strings" import reflect "reflect" @@ -115,6 +120,81 @@ func init() { proto.RegisterType((*Type)(nil), "reportnothing.Type") proto.RegisterType((*InstanceParam)(nil), "reportnothing.InstanceParam") } + +// 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 HandleReportNothingService service + +type HandleReportNothingServiceClient interface { + // HandleReportNothing is called by Mixer at request-time to deliver 'reportnothing' instances to the backend. + HandleReportNothing(ctx context.Context, in *HandleReportNothingRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +type handleReportNothingServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleReportNothingServiceClient(cc *grpc.ClientConn) HandleReportNothingServiceClient { + return &handleReportNothingServiceClient{cc} +} + +func (c *handleReportNothingServiceClient) HandleReportNothing(ctx context.Context, in *HandleReportNothingRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.ReportResult) + err := grpc.Invoke(ctx, "/reportnothing.HandleReportNothingService/HandleReportNothing", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleReportNothingService service + +type HandleReportNothingServiceServer interface { + // HandleReportNothing is called by Mixer at request-time to deliver 'reportnothing' instances to the backend. + HandleReportNothing(context.Context, *HandleReportNothingRequest) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +func RegisterHandleReportNothingServiceServer(s *grpc.Server, srv HandleReportNothingServiceServer) { + s.RegisterService(&_HandleReportNothingService_serviceDesc, srv) +} + +func _HandleReportNothingService_HandleReportNothing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleReportNothingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleReportNothingServiceServer).HandleReportNothing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/reportnothing.HandleReportNothingService/HandleReportNothing", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleReportNothingServiceServer).HandleReportNothing(ctx, req.(*HandleReportNothingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleReportNothingService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "reportnothing.HandleReportNothingService", + HandlerType: (*HandleReportNothingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleReportNothing", + Handler: _HandleReportNothingService_HandleReportNothing_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/reportnothing/template_handler_service.proto", +} + func (m *HandleReportNothingRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/sample/check/CheckTesterTemplate_handler_service.pb.go b/mixer/template/sample/check/CheckTesterTemplate_handler_service.pb.go index fccb77f7a4e6..c3bfbedb3a12 100644 --- a/mixer/template/sample/check/CheckTesterTemplate_handler_service.pb.go +++ b/mixer/template/sample/check/CheckTesterTemplate_handler_service.pb.go @@ -27,10 +27,15 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import encoding_binary "encoding/binary" import strings "strings" @@ -212,6 +217,81 @@ func init() { proto.RegisterType((*Res1InstanceParam)(nil), "istio.mixer.adapter.sample.check.Res1InstanceParam") proto.RegisterType((*Res2InstanceParam)(nil), "istio.mixer.adapter.sample.check.Res2InstanceParam") } + +// 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 HandleCheckService service + +type HandleCheckServiceClient interface { + // HandleCheck is called by Mixer at request-time to deliver 'check' instances to the backend. + HandleCheck(ctx context.Context, in *HandleCheckRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +type handleCheckServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleCheckServiceClient(cc *grpc.ClientConn) HandleCheckServiceClient { + return &handleCheckServiceClient{cc} +} + +func (c *handleCheckServiceClient) HandleCheck(ctx context.Context, in *HandleCheckRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.CheckResult) + err := grpc.Invoke(ctx, "/istio.mixer.adapter.sample.check.HandleCheckService/HandleCheck", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleCheckService service + +type HandleCheckServiceServer interface { + // HandleCheck is called by Mixer at request-time to deliver 'check' instances to the backend. + HandleCheck(context.Context, *HandleCheckRequest) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +func RegisterHandleCheckServiceServer(s *grpc.Server, srv HandleCheckServiceServer) { + s.RegisterService(&_HandleCheckService_serviceDesc, srv) +} + +func _HandleCheckService_HandleCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleCheckRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleCheckServiceServer).HandleCheck(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/istio.mixer.adapter.sample.check.HandleCheckService/HandleCheck", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleCheckServiceServer).HandleCheck(ctx, req.(*HandleCheckRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleCheckService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "istio.mixer.adapter.sample.check.HandleCheckService", + HandlerType: (*HandleCheckServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleCheck", + Handler: _HandleCheckService_HandleCheck_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/sample/check/CheckTesterTemplate_handler_service.proto", +} + func (m *HandleCheckRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/sample/quota/QuotaTesterTemplate_handler_service.pb.go b/mixer/template/sample/quota/QuotaTesterTemplate_handler_service.pb.go index e7ba1509f4f3..d2c1820b95ee 100644 --- a/mixer/template/sample/quota/QuotaTesterTemplate_handler_service.pb.go +++ b/mixer/template/sample/quota/QuotaTesterTemplate_handler_service.pb.go @@ -31,6 +31,11 @@ import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1be import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import encoding_binary "encoding/binary" import strings "strings" @@ -215,6 +220,81 @@ func init() { proto.RegisterType((*Res1InstanceParam)(nil), "istio.mixer.adapter.sample.quota.Res1InstanceParam") proto.RegisterType((*Res2InstanceParam)(nil), "istio.mixer.adapter.sample.quota.Res2InstanceParam") } + +// 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 HandleQuotaService service + +type HandleQuotaServiceClient interface { + // HandleQuota is called by Mixer at request-time to deliver 'quota' instances to the backend. + HandleQuota(ctx context.Context, in *HandleQuotaRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.QuotaResult, error) +} + +type handleQuotaServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleQuotaServiceClient(cc *grpc.ClientConn) HandleQuotaServiceClient { + return &handleQuotaServiceClient{cc} +} + +func (c *handleQuotaServiceClient) HandleQuota(ctx context.Context, in *HandleQuotaRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.QuotaResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.QuotaResult) + err := grpc.Invoke(ctx, "/istio.mixer.adapter.sample.quota.HandleQuotaService/HandleQuota", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleQuotaService service + +type HandleQuotaServiceServer interface { + // HandleQuota is called by Mixer at request-time to deliver 'quota' instances to the backend. + HandleQuota(context.Context, *HandleQuotaRequest) (*istio_mixer_adapter_model_v1beta11.QuotaResult, error) +} + +func RegisterHandleQuotaServiceServer(s *grpc.Server, srv HandleQuotaServiceServer) { + s.RegisterService(&_HandleQuotaService_serviceDesc, srv) +} + +func _HandleQuotaService_HandleQuota_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleQuotaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleQuotaServiceServer).HandleQuota(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/istio.mixer.adapter.sample.quota.HandleQuotaService/HandleQuota", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleQuotaServiceServer).HandleQuota(ctx, req.(*HandleQuotaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleQuotaService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "istio.mixer.adapter.sample.quota.HandleQuotaService", + HandlerType: (*HandleQuotaServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleQuota", + Handler: _HandleQuotaService_HandleQuota_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/sample/quota/QuotaTesterTemplate_handler_service.proto", +} + func (m *HandleQuotaRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/sample/report/ReportTesterTemplate_handler_service.pb.go b/mixer/template/sample/report/ReportTesterTemplate_handler_service.pb.go index 65ae05382ac4..fd8dec887bd6 100644 --- a/mixer/template/sample/report/ReportTesterTemplate_handler_service.pb.go +++ b/mixer/template/sample/report/ReportTesterTemplate_handler_service.pb.go @@ -27,10 +27,15 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import encoding_binary "encoding/binary" import strings "strings" @@ -240,6 +245,81 @@ func init() { proto.RegisterType((*Res1InstanceParam)(nil), "istio.mixer.adapter.sample.report.Res1InstanceParam") proto.RegisterType((*Res2InstanceParam)(nil), "istio.mixer.adapter.sample.report.Res2InstanceParam") } + +// 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 HandleReportService service + +type HandleReportServiceClient interface { + // HandleReport is called by Mixer at request-time to deliver 'report' instances to the backend. + HandleReport(ctx context.Context, in *HandleReportRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +type handleReportServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleReportServiceClient(cc *grpc.ClientConn) HandleReportServiceClient { + return &handleReportServiceClient{cc} +} + +func (c *handleReportServiceClient) HandleReport(ctx context.Context, in *HandleReportRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.ReportResult) + err := grpc.Invoke(ctx, "/istio.mixer.adapter.sample.report.HandleReportService/HandleReport", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleReportService service + +type HandleReportServiceServer interface { + // HandleReport is called by Mixer at request-time to deliver 'report' instances to the backend. + HandleReport(context.Context, *HandleReportRequest) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +func RegisterHandleReportServiceServer(s *grpc.Server, srv HandleReportServiceServer) { + s.RegisterService(&_HandleReportService_serviceDesc, srv) +} + +func _HandleReportService_HandleReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleReportServiceServer).HandleReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/istio.mixer.adapter.sample.report.HandleReportService/HandleReport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleReportServiceServer).HandleReport(ctx, req.(*HandleReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleReportService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "istio.mixer.adapter.sample.report.HandleReportService", + HandlerType: (*HandleReportServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleReport", + Handler: _HandleReportService_HandleReport_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/sample/report/ReportTesterTemplate_handler_service.proto", +} + func (m *HandleReportRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/template/tracespan/tracespan_handler_service.pb.go b/mixer/template/tracespan/tracespan_handler_service.pb.go index e2320ef67bf7..58e8abdccd2a 100644 --- a/mixer/template/tracespan/tracespan_handler_service.pb.go +++ b/mixer/template/tracespan/tracespan_handler_service.pb.go @@ -57,10 +57,15 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" @@ -216,6 +221,81 @@ func init() { proto.RegisterType((*Type)(nil), "tracespan.Type") proto.RegisterType((*InstanceParam)(nil), "tracespan.InstanceParam") } + +// 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 HandleTraceSpanService service + +type HandleTraceSpanServiceClient interface { + // HandleTraceSpan is called by Mixer at request-time to deliver 'tracespan' instances to the backend. + HandleTraceSpan(ctx context.Context, in *HandleTraceSpanRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +type handleTraceSpanServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleTraceSpanServiceClient(cc *grpc.ClientConn) HandleTraceSpanServiceClient { + return &handleTraceSpanServiceClient{cc} +} + +func (c *handleTraceSpanServiceClient) HandleTraceSpan(ctx context.Context, in *HandleTraceSpanRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.ReportResult) + err := grpc.Invoke(ctx, "/tracespan.HandleTraceSpanService/HandleTraceSpan", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleTraceSpanService service + +type HandleTraceSpanServiceServer interface { + // HandleTraceSpan is called by Mixer at request-time to deliver 'tracespan' instances to the backend. + HandleTraceSpan(context.Context, *HandleTraceSpanRequest) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +func RegisterHandleTraceSpanServiceServer(s *grpc.Server, srv HandleTraceSpanServiceServer) { + s.RegisterService(&_HandleTraceSpanService_serviceDesc, srv) +} + +func _HandleTraceSpanService_HandleTraceSpan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleTraceSpanRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleTraceSpanServiceServer).HandleTraceSpan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tracespan.HandleTraceSpanService/HandleTraceSpan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleTraceSpanServiceServer).HandleTraceSpan(ctx, req.(*HandleTraceSpanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleTraceSpanService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tracespan.HandleTraceSpanService", + HandlerType: (*HandleTraceSpanServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleTraceSpan", + Handler: _HandleTraceSpanService_HandleTraceSpan_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/template/tracespan/tracespan_handler_service.proto", +} + func (m *HandleTraceSpanRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/test/spyAdapter/template/check/tmpl_handler_service.pb.go b/mixer/test/spyAdapter/template/check/tmpl_handler_service.pb.go index 6668b8449e80..ad30ee384894 100644 --- a/mixer/test/spyAdapter/template/check/tmpl_handler_service.pb.go +++ b/mixer/test/spyAdapter/template/check/tmpl_handler_service.pb.go @@ -21,7 +21,12 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) import strings "strings" import reflect "reflect" @@ -96,6 +101,81 @@ func init() { proto.RegisterType((*Type)(nil), "samplecheck.Type") proto.RegisterType((*InstanceParam)(nil), "samplecheck.InstanceParam") } + +// 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 HandleSampleCheckService service + +type HandleSampleCheckServiceClient interface { + // HandleSampleCheck is called by Mixer at request-time to deliver 'samplecheck' instances to the backend. + HandleSampleCheck(ctx context.Context, in *HandleSampleCheckRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +type handleSampleCheckServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleSampleCheckServiceClient(cc *grpc.ClientConn) HandleSampleCheckServiceClient { + return &handleSampleCheckServiceClient{cc} +} + +func (c *handleSampleCheckServiceClient) HandleSampleCheck(ctx context.Context, in *HandleSampleCheckRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.CheckResult) + err := grpc.Invoke(ctx, "/samplecheck.HandleSampleCheckService/HandleSampleCheck", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleSampleCheckService service + +type HandleSampleCheckServiceServer interface { + // HandleSampleCheck is called by Mixer at request-time to deliver 'samplecheck' instances to the backend. + HandleSampleCheck(context.Context, *HandleSampleCheckRequest) (*istio_mixer_adapter_model_v1beta11.CheckResult, error) +} + +func RegisterHandleSampleCheckServiceServer(s *grpc.Server, srv HandleSampleCheckServiceServer) { + s.RegisterService(&_HandleSampleCheckService_serviceDesc, srv) +} + +func _HandleSampleCheckService_HandleSampleCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleSampleCheckRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleSampleCheckServiceServer).HandleSampleCheck(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/samplecheck.HandleSampleCheckService/HandleSampleCheck", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleSampleCheckServiceServer).HandleSampleCheck(ctx, req.(*HandleSampleCheckRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleSampleCheckService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "samplecheck.HandleSampleCheckService", + HandlerType: (*HandleSampleCheckServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleSampleCheck", + Handler: _HandleSampleCheckService_HandleSampleCheck_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/test/spyAdapter/template/check/tmpl_handler_service.proto", +} + func (m *HandleSampleCheckRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/mixer/test/spyAdapter/template/report/reporttmpl_handler_service.pb.go b/mixer/test/spyAdapter/template/report/reporttmpl_handler_service.pb.go index 778a5df416b9..c4ae489ae9f6 100644 --- a/mixer/test/spyAdapter/template/report/reporttmpl_handler_service.pb.go +++ b/mixer/test/spyAdapter/template/report/reporttmpl_handler_service.pb.go @@ -21,10 +21,15 @@ import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "istio.io/api/mixer/adapter/model/v1beta1" import google_protobuf1 "github.com/gogo/protobuf/types" -import _ "istio.io/api/mixer/adapter/model/v1beta1" +import istio_mixer_adapter_model_v1beta11 "istio.io/api/mixer/adapter/model/v1beta1" import istio_policy_v1beta1 "istio.io/api/policy/v1beta1" import istio_mixer_adapter_model_v1beta12 "istio.io/api/mixer/adapter/model/v1beta1" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" @@ -107,6 +112,81 @@ func init() { proto.RegisterType((*Type)(nil), "samplereport.Type") proto.RegisterType((*InstanceParam)(nil), "samplereport.InstanceParam") } + +// 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 HandleSampleReportService service + +type HandleSampleReportServiceClient interface { + // HandleSampleReport is called by Mixer at request-time to deliver 'samplereport' instances to the backend. + HandleSampleReport(ctx context.Context, in *HandleSampleReportRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +type handleSampleReportServiceClient struct { + cc *grpc.ClientConn +} + +func NewHandleSampleReportServiceClient(cc *grpc.ClientConn) HandleSampleReportServiceClient { + return &handleSampleReportServiceClient{cc} +} + +func (c *handleSampleReportServiceClient) HandleSampleReport(ctx context.Context, in *HandleSampleReportRequest, opts ...grpc.CallOption) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) { + out := new(istio_mixer_adapter_model_v1beta11.ReportResult) + err := grpc.Invoke(ctx, "/samplereport.HandleSampleReportService/HandleSampleReport", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for HandleSampleReportService service + +type HandleSampleReportServiceServer interface { + // HandleSampleReport is called by Mixer at request-time to deliver 'samplereport' instances to the backend. + HandleSampleReport(context.Context, *HandleSampleReportRequest) (*istio_mixer_adapter_model_v1beta11.ReportResult, error) +} + +func RegisterHandleSampleReportServiceServer(s *grpc.Server, srv HandleSampleReportServiceServer) { + s.RegisterService(&_HandleSampleReportService_serviceDesc, srv) +} + +func _HandleSampleReportService_HandleSampleReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HandleSampleReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HandleSampleReportServiceServer).HandleSampleReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/samplereport.HandleSampleReportService/HandleSampleReport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HandleSampleReportServiceServer).HandleSampleReport(ctx, req.(*HandleSampleReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HandleSampleReportService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "samplereport.HandleSampleReportService", + HandlerType: (*HandleSampleReportServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HandleSampleReport", + Handler: _HandleSampleReportService_HandleSampleReport_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/test/spyAdapter/template/report/reporttmpl_handler_service.proto", +} + func (m *HandleSampleReportRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size)