Documentation ¶
Overview ¶
Package v1beta1 is a generated protocol buffer package.
It is generated from these files:
mixer/adapter/model/v1beta1/check.proto mixer/adapter/model/v1beta1/extensions.proto mixer/adapter/model/v1beta1/info.proto mixer/adapter/model/v1beta1/infrastructure_backend.proto mixer/adapter/model/v1beta1/quota.proto mixer/adapter/model/v1beta1/report.proto mixer/adapter/model/v1beta1/template.proto
It has these top-level messages:
CheckResult Info CreateSessionRequest CreateSessionResponse ValidateRequest ValidateResponse CloseSessionRequest CloseSessionResponse QuotaRequest QuotaResult ReportResult Template
Index ¶
- Variables
- func RegisterInfrastructureBackendServer(s *grpc.Server, srv InfrastructureBackendServer)
- type CheckResult
- func (*CheckResult) Descriptor() ([]byte, []int)
- func (m *CheckResult) Marshal() (dAtA []byte, err error)
- func (m *CheckResult) MarshalTo(dAtA []byte) (int, error)
- func (*CheckResult) ProtoMessage()
- func (m *CheckResult) Reset()
- func (m *CheckResult) Size() (n int)
- func (this *CheckResult) String() string
- func (m *CheckResult) Unmarshal(dAtA []byte) error
- type CloseSessionRequest
- func (*CloseSessionRequest) Descriptor() ([]byte, []int)
- func (this *CloseSessionRequest) Equal(that interface{}) bool
- func (m *CloseSessionRequest) GetSessionId() string
- func (this *CloseSessionRequest) GoString() string
- func (m *CloseSessionRequest) Marshal() (dAtA []byte, err error)
- func (m *CloseSessionRequest) MarshalTo(dAtA []byte) (int, error)
- func (*CloseSessionRequest) ProtoMessage()
- func (m *CloseSessionRequest) Reset()
- func (m *CloseSessionRequest) Size() (n int)
- func (this *CloseSessionRequest) String() string
- func (m *CloseSessionRequest) Unmarshal(dAtA []byte) error
- type CloseSessionResponse
- func (*CloseSessionResponse) Descriptor() ([]byte, []int)
- func (this *CloseSessionResponse) Equal(that interface{}) bool
- func (m *CloseSessionResponse) GetStatus() *google_rpc.Status
- func (this *CloseSessionResponse) GoString() string
- func (m *CloseSessionResponse) Marshal() (dAtA []byte, err error)
- func (m *CloseSessionResponse) MarshalTo(dAtA []byte) (int, error)
- func (*CloseSessionResponse) ProtoMessage()
- func (m *CloseSessionResponse) Reset()
- func (m *CloseSessionResponse) Size() (n int)
- func (this *CloseSessionResponse) String() string
- func (m *CloseSessionResponse) Unmarshal(dAtA []byte) error
- type CreateSessionRequest
- func (*CreateSessionRequest) Descriptor() ([]byte, []int)
- func (this *CreateSessionRequest) Equal(that interface{}) bool
- func (m *CreateSessionRequest) GetAdapterConfig() *google_protobuf2.Any
- func (m *CreateSessionRequest) GetInferredTypes() map[string]*google_protobuf2.Any
- func (this *CreateSessionRequest) GoString() string
- func (m *CreateSessionRequest) Marshal() (dAtA []byte, err error)
- func (m *CreateSessionRequest) MarshalTo(dAtA []byte) (int, error)
- func (*CreateSessionRequest) ProtoMessage()
- func (m *CreateSessionRequest) Reset()
- func (m *CreateSessionRequest) Size() (n int)
- func (this *CreateSessionRequest) String() string
- func (m *CreateSessionRequest) Unmarshal(dAtA []byte) error
- type CreateSessionResponse
- func (*CreateSessionResponse) Descriptor() ([]byte, []int)
- func (this *CreateSessionResponse) Equal(that interface{}) bool
- func (m *CreateSessionResponse) GetSessionId() string
- func (m *CreateSessionResponse) GetStatus() *google_rpc.Status
- func (this *CreateSessionResponse) GoString() string
- func (m *CreateSessionResponse) Marshal() (dAtA []byte, err error)
- func (m *CreateSessionResponse) MarshalTo(dAtA []byte) (int, error)
- func (*CreateSessionResponse) ProtoMessage()
- func (m *CreateSessionResponse) Reset()
- func (m *CreateSessionResponse) Size() (n int)
- func (this *CreateSessionResponse) String() string
- func (m *CreateSessionResponse) Unmarshal(dAtA []byte) error
- type Info
- func (*Info) Descriptor() ([]byte, []int)
- func (this *Info) Equal(that interface{}) bool
- func (m *Info) GetConfig() string
- func (m *Info) GetDescription() string
- func (m *Info) GetName() string
- func (m *Info) GetSessionBased() bool
- func (m *Info) GetTemplates() []string
- func (this *Info) GoString() string
- func (m *Info) Marshal() (dAtA []byte, err error)
- func (m *Info) MarshalTo(dAtA []byte) (int, error)
- func (*Info) ProtoMessage()
- func (m *Info) Reset()
- func (m *Info) Size() (n int)
- func (this *Info) String() string
- func (m *Info) Unmarshal(dAtA []byte) error
- type InfrastructureBackendClient
- type InfrastructureBackendServer
- type QuotaRequest
- func (*QuotaRequest) Descriptor() ([]byte, []int)
- func (m *QuotaRequest) Marshal() (dAtA []byte, err error)
- func (m *QuotaRequest) MarshalTo(dAtA []byte) (int, error)
- func (*QuotaRequest) ProtoMessage()
- func (m *QuotaRequest) Reset()
- func (m *QuotaRequest) Size() (n int)
- func (this *QuotaRequest) String() string
- func (m *QuotaRequest) Unmarshal(dAtA []byte) error
- type QuotaRequest_QuotaParams
- func (*QuotaRequest_QuotaParams) Descriptor() ([]byte, []int)
- func (m *QuotaRequest_QuotaParams) Marshal() (dAtA []byte, err error)
- func (m *QuotaRequest_QuotaParams) MarshalTo(dAtA []byte) (int, error)
- func (*QuotaRequest_QuotaParams) ProtoMessage()
- func (m *QuotaRequest_QuotaParams) Reset()
- func (m *QuotaRequest_QuotaParams) Size() (n int)
- func (this *QuotaRequest_QuotaParams) String() string
- func (m *QuotaRequest_QuotaParams) Unmarshal(dAtA []byte) error
- type QuotaResult
- func (*QuotaResult) Descriptor() ([]byte, []int)
- func (m *QuotaResult) Marshal() (dAtA []byte, err error)
- func (m *QuotaResult) MarshalTo(dAtA []byte) (int, error)
- func (*QuotaResult) ProtoMessage()
- func (m *QuotaResult) Reset()
- func (m *QuotaResult) Size() (n int)
- func (this *QuotaResult) String() string
- func (m *QuotaResult) Unmarshal(dAtA []byte) error
- type QuotaResult_Result
- func (*QuotaResult_Result) Descriptor() ([]byte, []int)
- func (m *QuotaResult_Result) Marshal() (dAtA []byte, err error)
- func (m *QuotaResult_Result) MarshalTo(dAtA []byte) (int, error)
- func (*QuotaResult_Result) ProtoMessage()
- func (m *QuotaResult_Result) Reset()
- func (m *QuotaResult_Result) Size() (n int)
- func (this *QuotaResult_Result) String() string
- func (m *QuotaResult_Result) Unmarshal(dAtA []byte) error
- type ReportResult
- func (*ReportResult) Descriptor() ([]byte, []int)
- func (m *ReportResult) Marshal() (dAtA []byte, err error)
- func (m *ReportResult) MarshalTo(dAtA []byte) (int, error)
- func (*ReportResult) ProtoMessage()
- func (m *ReportResult) Reset()
- func (m *ReportResult) Size() (n int)
- func (this *ReportResult) String() string
- func (m *ReportResult) Unmarshal(dAtA []byte) error
- type Template
- func (*Template) Descriptor() ([]byte, []int)
- func (this *Template) Equal(that interface{}) bool
- func (m *Template) GetDescriptor_() string
- func (this *Template) GoString() string
- func (m *Template) Marshal() (dAtA []byte, err error)
- func (m *Template) MarshalTo(dAtA []byte) (int, error)
- func (*Template) ProtoMessage()
- func (m *Template) Reset()
- func (m *Template) Size() (n int)
- func (this *Template) String() string
- func (m *Template) Unmarshal(dAtA []byte) error
- type TemplateVariety
- type ValidateRequest
- func (*ValidateRequest) Descriptor() ([]byte, []int)
- func (this *ValidateRequest) Equal(that interface{}) bool
- func (m *ValidateRequest) GetAdapterConfig() *google_protobuf2.Any
- func (m *ValidateRequest) GetInferredTypes() map[string]*google_protobuf2.Any
- func (this *ValidateRequest) GoString() string
- func (m *ValidateRequest) Marshal() (dAtA []byte, err error)
- func (m *ValidateRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ValidateRequest) ProtoMessage()
- func (m *ValidateRequest) Reset()
- func (m *ValidateRequest) Size() (n int)
- func (this *ValidateRequest) String() string
- func (m *ValidateRequest) Unmarshal(dAtA []byte) error
- type ValidateResponse
- func (*ValidateResponse) Descriptor() ([]byte, []int)
- func (this *ValidateResponse) Equal(that interface{}) bool
- func (m *ValidateResponse) GetStatus() *google_rpc.Status
- func (this *ValidateResponse) GoString() string
- func (m *ValidateResponse) Marshal() (dAtA []byte, err error)
- func (m *ValidateResponse) MarshalTo(dAtA []byte) (int, error)
- func (*ValidateResponse) ProtoMessage()
- func (m *ValidateResponse) Reset()
- func (m *ValidateResponse) Size() (n int)
- func (this *ValidateResponse) String() string
- func (m *ValidateResponse) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthCheck = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCheck = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthInfo = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowInfo = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthInfrastructureBackend = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowInfrastructureBackend = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthQuota = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuota = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthReport = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowReport = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthTemplate = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTemplate = fmt.Errorf("proto: integer overflow") )
var E_TemplateName = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.FileOptions)(nil), ExtensionType: (*string)(nil), Field: 72295888, Name: "istio.mixer.adapter.model.v1beta1.template_name", Tag: "bytes,72295888,opt,name=template_name,json=templateName", Filename: "mixer/adapter/model/v1beta1/extensions.proto", }
var E_TemplateVariety = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.FileOptions)(nil), ExtensionType: (*TemplateVariety)(nil), Field: 72295727, Name: "istio.mixer.adapter.model.v1beta1.template_variety", Tag: "varint,72295727,opt,name=template_variety,json=templateVariety,enum=istio.mixer.adapter.model.v1beta1.TemplateVariety", Filename: "mixer/adapter/model/v1beta1/extensions.proto", }
var TemplateVariety_name = map[int32]string{
0: "TEMPLATE_VARIETY_CHECK",
1: "TEMPLATE_VARIETY_REPORT",
2: "TEMPLATE_VARIETY_QUOTA",
3: "TEMPLATE_VARIETY_ATTRIBUTE_GENERATOR",
}
var TemplateVariety_value = map[string]int32{
"TEMPLATE_VARIETY_CHECK": 0,
"TEMPLATE_VARIETY_REPORT": 1,
"TEMPLATE_VARIETY_QUOTA": 2,
"TEMPLATE_VARIETY_ATTRIBUTE_GENERATOR": 3,
}
Functions ¶
func RegisterInfrastructureBackendServer ¶
func RegisterInfrastructureBackendServer(s *grpc.Server, srv InfrastructureBackendServer)
Types ¶
type CheckResult ¶
type CheckResult struct { // A status code of OK indicates preconditions were satisfied. Any other code indicates preconditions were not // satisfied and details describe why. Status google_rpc.Status `protobuf:"bytes,1,opt,name=status" json:"status"` // The amount of time for which this result can be considered valid. ValidDuration time.Duration `protobuf:"bytes,2,opt,name=valid_duration,json=validDuration,stdduration" json:"valid_duration"` // The number of uses for which this result can be considered valid. ValidUseCount int32 `protobuf:"varint,3,opt,name=valid_use_count,json=validUseCount,proto3" json:"valid_use_count,omitempty"` }
Expresses the result of a precondition check.
func (*CheckResult) Descriptor ¶
func (*CheckResult) Descriptor() ([]byte, []int)
func (*CheckResult) Marshal ¶
func (m *CheckResult) Marshal() (dAtA []byte, err error)
func (*CheckResult) ProtoMessage ¶
func (*CheckResult) ProtoMessage()
func (*CheckResult) Reset ¶
func (m *CheckResult) Reset()
func (*CheckResult) Size ¶
func (m *CheckResult) Size() (n int)
func (*CheckResult) String ¶
func (this *CheckResult) String() string
func (*CheckResult) Unmarshal ¶
func (m *CheckResult) Unmarshal(dAtA []byte) error
type CloseSessionRequest ¶
type CloseSessionRequest struct { // Id of the session to be closed. SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` }
Request message for `CloseSession` method.
func (*CloseSessionRequest) Descriptor ¶
func (*CloseSessionRequest) Descriptor() ([]byte, []int)
func (*CloseSessionRequest) Equal ¶
func (this *CloseSessionRequest) Equal(that interface{}) bool
func (*CloseSessionRequest) GetSessionId ¶
func (m *CloseSessionRequest) GetSessionId() string
func (*CloseSessionRequest) GoString ¶
func (this *CloseSessionRequest) GoString() string
func (*CloseSessionRequest) Marshal ¶
func (m *CloseSessionRequest) Marshal() (dAtA []byte, err error)
func (*CloseSessionRequest) MarshalTo ¶
func (m *CloseSessionRequest) MarshalTo(dAtA []byte) (int, error)
func (*CloseSessionRequest) ProtoMessage ¶
func (*CloseSessionRequest) ProtoMessage()
func (*CloseSessionRequest) Reset ¶
func (m *CloseSessionRequest) Reset()
func (*CloseSessionRequest) Size ¶
func (m *CloseSessionRequest) Size() (n int)
func (*CloseSessionRequest) String ¶
func (this *CloseSessionRequest) String() string
func (*CloseSessionRequest) Unmarshal ¶
func (m *CloseSessionRequest) Unmarshal(dAtA []byte) error
type CloseSessionResponse ¶
type CloseSessionResponse struct { // The success/failure status of close session call. Status *google_rpc.Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` }
Response message for `CloseSession` method.
func (*CloseSessionResponse) Descriptor ¶
func (*CloseSessionResponse) Descriptor() ([]byte, []int)
func (*CloseSessionResponse) Equal ¶
func (this *CloseSessionResponse) Equal(that interface{}) bool
func (*CloseSessionResponse) GetStatus ¶
func (m *CloseSessionResponse) GetStatus() *google_rpc.Status
func (*CloseSessionResponse) GoString ¶
func (this *CloseSessionResponse) GoString() string
func (*CloseSessionResponse) Marshal ¶
func (m *CloseSessionResponse) Marshal() (dAtA []byte, err error)
func (*CloseSessionResponse) MarshalTo ¶
func (m *CloseSessionResponse) MarshalTo(dAtA []byte) (int, error)
func (*CloseSessionResponse) ProtoMessage ¶
func (*CloseSessionResponse) ProtoMessage()
func (*CloseSessionResponse) Reset ¶
func (m *CloseSessionResponse) Reset()
func (*CloseSessionResponse) Size ¶
func (m *CloseSessionResponse) Size() (n int)
func (*CloseSessionResponse) String ¶
func (this *CloseSessionResponse) String() string
func (*CloseSessionResponse) Unmarshal ¶
func (m *CloseSessionResponse) Unmarshal(dAtA []byte) error
type CreateSessionRequest ¶
type CreateSessionRequest struct { // Adapter specific configuration. AdapterConfig *google_protobuf2.Any `protobuf:"bytes,1,opt,name=adapter_config,json=adapterConfig" json:"adapter_config,omitempty"` // Map of instance names to their template-specific inferred type. InferredTypes map[string]*google_protobuf2.Any `` /* 174-byte string literal not displayed */ }
Request message for `CreateSession` method.
func (*CreateSessionRequest) Descriptor ¶
func (*CreateSessionRequest) Descriptor() ([]byte, []int)
func (*CreateSessionRequest) Equal ¶
func (this *CreateSessionRequest) Equal(that interface{}) bool
func (*CreateSessionRequest) GetAdapterConfig ¶
func (m *CreateSessionRequest) GetAdapterConfig() *google_protobuf2.Any
func (*CreateSessionRequest) GetInferredTypes ¶
func (m *CreateSessionRequest) GetInferredTypes() map[string]*google_protobuf2.Any
func (*CreateSessionRequest) GoString ¶
func (this *CreateSessionRequest) GoString() string
func (*CreateSessionRequest) Marshal ¶
func (m *CreateSessionRequest) Marshal() (dAtA []byte, err error)
func (*CreateSessionRequest) MarshalTo ¶
func (m *CreateSessionRequest) MarshalTo(dAtA []byte) (int, error)
func (*CreateSessionRequest) ProtoMessage ¶
func (*CreateSessionRequest) ProtoMessage()
func (*CreateSessionRequest) Reset ¶
func (m *CreateSessionRequest) Reset()
func (*CreateSessionRequest) Size ¶
func (m *CreateSessionRequest) Size() (n int)
func (*CreateSessionRequest) String ¶
func (this *CreateSessionRequest) String() string
func (*CreateSessionRequest) Unmarshal ¶
func (m *CreateSessionRequest) Unmarshal(dAtA []byte) error
type CreateSessionResponse ¶
type CreateSessionResponse struct { // Id of the created session. SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // The success/failure status of create session call. Status *google_rpc.Status `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"` }
Response message for `CreateSession` method.
func (*CreateSessionResponse) Descriptor ¶
func (*CreateSessionResponse) Descriptor() ([]byte, []int)
func (*CreateSessionResponse) Equal ¶
func (this *CreateSessionResponse) Equal(that interface{}) bool
func (*CreateSessionResponse) GetSessionId ¶
func (m *CreateSessionResponse) GetSessionId() string
func (*CreateSessionResponse) GetStatus ¶
func (m *CreateSessionResponse) GetStatus() *google_rpc.Status
func (*CreateSessionResponse) GoString ¶
func (this *CreateSessionResponse) GoString() string
func (*CreateSessionResponse) Marshal ¶
func (m *CreateSessionResponse) Marshal() (dAtA []byte, err error)
func (*CreateSessionResponse) MarshalTo ¶
func (m *CreateSessionResponse) MarshalTo(dAtA []byte) (int, error)
func (*CreateSessionResponse) ProtoMessage ¶
func (*CreateSessionResponse) ProtoMessage()
func (*CreateSessionResponse) Reset ¶
func (m *CreateSessionResponse) Reset()
func (*CreateSessionResponse) Size ¶
func (m *CreateSessionResponse) Size() (n int)
func (*CreateSessionResponse) String ¶
func (this *CreateSessionResponse) String() string
func (*CreateSessionResponse) Unmarshal ¶
func (m *CreateSessionResponse) Unmarshal(dAtA []byte) error
type Info ¶
type Info struct { // Name of the adapter. It must be an RFC 1035 compatible DNS label // matching the `^[a-z]([-a-z0-9]*[a-z0-9])?$` regular expression. // Name is used in Istio configuration, therefore it should be descriptive but short. // example: denier // Vendor adapters should use a vendor prefix. // example: mycompany-denier Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // User-friendly description of the adapter. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // Names of the templates the adapter supports. Templates []string `protobuf:"bytes,3,rep,name=templates" json:"templates,omitempty"` // Base64 encoded proto descriptor of the adapter configuration. Config string `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` // True if backend has implemented the // [InfrastructureBackend](https://github.com/istio/api/blob/master/mixer/adapter/model/v1beta1/infrastructure_backend.proto) // service; false otherwise. // // If true, during configuration time, Mixer calls the `InfrastructureBackend`' rpcs // to validate and pass the handler configuration. And during request-time, Mixer does not pass the handler // configuration, and only passes the template-specific Instance payload using the template-specific handle service (Example // [HandlerMetricService](https://github.com/istio/istio/blob/master/mixer/template/metric/template_handler_service.proto), // [HandlerListEntryService](https://github.com/istio/istio/blob/master/mixer/template/logentry/template_handler_service.proto), // [HandleQuotaService](https://github.com/istio/istio/blob/master/mixer/template/quota/template_handler_service.proto) and more). // If `session_based` is false, Mixer does not expect backend to implement `InfrastructureBackend` service, and // only communicates with the backends during request-time through the template-specific handle service. Without // `InfrastructureBackend` service, Mixer passes the handler configuration on each call during request-time. SessionBased bool `protobuf:"varint,5,opt,name=session_based,json=sessionBased,proto3" json:"session_based,omitempty"` }
Info describes an adapter or a backend that wants to provide telemetry and policy functionality to Mixer as an out of process adapter.
func (*Info) Descriptor ¶
func (*Info) GetDescription ¶
func (*Info) GetSessionBased ¶
func (*Info) GetTemplates ¶
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
type InfrastructureBackendClient ¶
type InfrastructureBackendClient interface { // Validates the handler configuration along with the template-specific instances that would be routed to that // handler. The `CreateSession` for a specific handler configuration is invoked only if its associated `Validate` // call has returned success. Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) // Creates a session for a given handler configuration and the template-specific instances that would be routed to // that handler. For every handler configuration, Mixer creates a separate session by invoking `CreateSession` // on the backend. // // `CreateSessionRequest` contains the adapter specific handler configuration and the inferred type information about // the instances the handler would receive during request processing. // // `CreateSession` must return a `session_id` which Mixer uses to invoke template-specific Handle functions during // request processing. The `session_id` provides the Handle functions a way to retrieve the necessary configuration // associated with the session. Upon Mixer configuration change, Mixer will re-invoke `CreateSession` for all // handler configurations whose existing sessions are invalidated or didn't existed. // // Backend is allowed to return the same session id if given the same configuration block. // This would happen when multiple instances of Mixer in a deployment all create sessions with the same configuration. // Note that given individial instances of Mixer can call `CloseSession`, reusing `session_id` by the backend // assumes that the backend is doing reference counting. // // If the backend couldn't create a session for a specific handler configuration and // returns non S_OK status, Mixer will not make request-time Handle calls associated with that handler configuration. CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error) // Closes the session associated with the `session_id`. Mixer closes a session when its associated handler // configuration or the instance configuration changes. Backend is supposed to cleanup all the resources associated // with the session_id referenced by CloseSessionRequest. CloseSession(ctx context.Context, in *CloseSessionRequest, opts ...grpc.CallOption) (*CloseSessionResponse, error) }
func NewInfrastructureBackendClient ¶
func NewInfrastructureBackendClient(cc *grpc.ClientConn) InfrastructureBackendClient
type InfrastructureBackendServer ¶
type InfrastructureBackendServer interface { // Validates the handler configuration along with the template-specific instances that would be routed to that // handler. The `CreateSession` for a specific handler configuration is invoked only if its associated `Validate` // call has returned success. Validate(context.Context, *ValidateRequest) (*ValidateResponse, error) // Creates a session for a given handler configuration and the template-specific instances that would be routed to // that handler. For every handler configuration, Mixer creates a separate session by invoking `CreateSession` // on the backend. // // `CreateSessionRequest` contains the adapter specific handler configuration and the inferred type information about // the instances the handler would receive during request processing. // // `CreateSession` must return a `session_id` which Mixer uses to invoke template-specific Handle functions during // request processing. The `session_id` provides the Handle functions a way to retrieve the necessary configuration // associated with the session. Upon Mixer configuration change, Mixer will re-invoke `CreateSession` for all // handler configurations whose existing sessions are invalidated or didn't existed. // // Backend is allowed to return the same session id if given the same configuration block. // This would happen when multiple instances of Mixer in a deployment all create sessions with the same configuration. // Note that given individial instances of Mixer can call `CloseSession`, reusing `session_id` by the backend // assumes that the backend is doing reference counting. // // If the backend couldn't create a session for a specific handler configuration and // returns non S_OK status, Mixer will not make request-time Handle calls associated with that handler configuration. CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) // Closes the session associated with the `session_id`. Mixer closes a session when its associated handler // configuration or the instance configuration changes. Backend is supposed to cleanup all the resources associated // with the session_id referenced by CloseSessionRequest. CloseSession(context.Context, *CloseSessionRequest) (*CloseSessionResponse, error) }
type QuotaRequest ¶
type QuotaRequest struct { // The individual quotas to allocate Quotas map[string]QuotaRequest_QuotaParams `` /* 129-byte string literal not displayed */ }
Expresses the quota allocation request.
func (*QuotaRequest) Descriptor ¶
func (*QuotaRequest) Descriptor() ([]byte, []int)
func (*QuotaRequest) Marshal ¶
func (m *QuotaRequest) Marshal() (dAtA []byte, err error)
func (*QuotaRequest) ProtoMessage ¶
func (*QuotaRequest) ProtoMessage()
func (*QuotaRequest) Reset ¶
func (m *QuotaRequest) Reset()
func (*QuotaRequest) Size ¶
func (m *QuotaRequest) Size() (n int)
func (*QuotaRequest) String ¶
func (this *QuotaRequest) String() string
func (*QuotaRequest) Unmarshal ¶
func (m *QuotaRequest) Unmarshal(dAtA []byte) error
type QuotaRequest_QuotaParams ¶
type QuotaRequest_QuotaParams struct { // Amount of quota to allocate Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` // When true, supports returning less quota than what was requested. BestEffort bool `protobuf:"varint,2,opt,name=best_effort,json=bestEffort,proto3" json:"best_effort,omitempty"` }
parameters for a quota allocation
func (*QuotaRequest_QuotaParams) Descriptor ¶
func (*QuotaRequest_QuotaParams) Descriptor() ([]byte, []int)
func (*QuotaRequest_QuotaParams) Marshal ¶
func (m *QuotaRequest_QuotaParams) Marshal() (dAtA []byte, err error)
func (*QuotaRequest_QuotaParams) MarshalTo ¶
func (m *QuotaRequest_QuotaParams) MarshalTo(dAtA []byte) (int, error)
func (*QuotaRequest_QuotaParams) ProtoMessage ¶
func (*QuotaRequest_QuotaParams) ProtoMessage()
func (*QuotaRequest_QuotaParams) Reset ¶
func (m *QuotaRequest_QuotaParams) Reset()
func (*QuotaRequest_QuotaParams) Size ¶
func (m *QuotaRequest_QuotaParams) Size() (n int)
func (*QuotaRequest_QuotaParams) String ¶
func (this *QuotaRequest_QuotaParams) String() string
func (*QuotaRequest_QuotaParams) Unmarshal ¶
func (m *QuotaRequest_QuotaParams) Unmarshal(dAtA []byte) error
type QuotaResult ¶
type QuotaResult struct { // The resulting quota, one entry per requested quota. Quotas map[string]QuotaResult_Result `` /* 129-byte string literal not displayed */ }
Expresses the result of multiple quota allocations.
func (*QuotaResult) Descriptor ¶
func (*QuotaResult) Descriptor() ([]byte, []int)
func (*QuotaResult) Marshal ¶
func (m *QuotaResult) Marshal() (dAtA []byte, err error)
func (*QuotaResult) ProtoMessage ¶
func (*QuotaResult) ProtoMessage()
func (*QuotaResult) Reset ¶
func (m *QuotaResult) Reset()
func (*QuotaResult) Size ¶
func (m *QuotaResult) Size() (n int)
func (*QuotaResult) String ¶
func (this *QuotaResult) String() string
func (*QuotaResult) Unmarshal ¶
func (m *QuotaResult) Unmarshal(dAtA []byte) error
type QuotaResult_Result ¶
type QuotaResult_Result struct { // The amount of time for which this result can be considered valid. ValidDuration time.Duration `protobuf:"bytes,2,opt,name=valid_duration,json=validDuration,stdduration" json:"valid_duration"` // The amount of granted quota. When `QuotaParams.best_effort` is true, this will be >= 0. // If `QuotaParams.best_effort` is false, this will be either 0 or >= `QuotaParams.amount`. GrantedAmount int64 `protobuf:"varint,3,opt,name=granted_amount,json=grantedAmount,proto3" json:"granted_amount,omitempty"` }
Expresses the result of a quota allocation.
func (*QuotaResult_Result) Descriptor ¶
func (*QuotaResult_Result) Descriptor() ([]byte, []int)
func (*QuotaResult_Result) Marshal ¶
func (m *QuotaResult_Result) Marshal() (dAtA []byte, err error)
func (*QuotaResult_Result) MarshalTo ¶
func (m *QuotaResult_Result) MarshalTo(dAtA []byte) (int, error)
func (*QuotaResult_Result) ProtoMessage ¶
func (*QuotaResult_Result) ProtoMessage()
func (*QuotaResult_Result) Reset ¶
func (m *QuotaResult_Result) Reset()
func (*QuotaResult_Result) Size ¶
func (m *QuotaResult_Result) Size() (n int)
func (*QuotaResult_Result) String ¶
func (this *QuotaResult_Result) String() string
func (*QuotaResult_Result) Unmarshal ¶
func (m *QuotaResult_Result) Unmarshal(dAtA []byte) error
type ReportResult ¶
type ReportResult struct { }
Expresses the result of a report call.
func (*ReportResult) Descriptor ¶
func (*ReportResult) Descriptor() ([]byte, []int)
func (*ReportResult) Marshal ¶
func (m *ReportResult) Marshal() (dAtA []byte, err error)
func (*ReportResult) ProtoMessage ¶
func (*ReportResult) ProtoMessage()
func (*ReportResult) Reset ¶
func (m *ReportResult) Reset()
func (*ReportResult) Size ¶
func (m *ReportResult) Size() (n int)
func (*ReportResult) String ¶
func (this *ReportResult) String() string
func (*ReportResult) Unmarshal ¶
func (m *ReportResult) Unmarshal(dAtA []byte) error
type Template ¶
type Template struct { // Base64 encoded proto descriptor of the template. Descriptor_ string `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` }
Template provides the details of a mixer template.
func (*Template) Descriptor ¶
func (*Template) GetDescriptor_ ¶
func (*Template) ProtoMessage ¶
func (*Template) ProtoMessage()
type TemplateVariety ¶
type TemplateVariety int32
The available varieties of templates, controlling the semantics of what an adapter does with each instance.
const ( // Makes the template applicable for Mixer's check calls. Instances of such template are created during // report calls in Mixer and passed to the handlers based on the rule configurations. TEMPLATE_VARIETY_CHECK TemplateVariety = 0 // Makes the template applicable for Mixer's report calls. Instances of such template are created during // check calls in Mixer and passed to the handlers based on the rule configurations. TEMPLATE_VARIETY_REPORT TemplateVariety = 1 // Makes the template applicable for Mixer's quota calls. Instances of such template are created during // quota check calls in Mixer and passed to the handlers based on the rule configurations. TEMPLATE_VARIETY_QUOTA TemplateVariety = 2 // Makes the template applicable for Mixer's attribute generation phase. Instances of such template are created during // pre-processing attribute generation phase and passed to the handlers based on the rule configurations. TEMPLATE_VARIETY_ATTRIBUTE_GENERATOR TemplateVariety = 3 )
func (TemplateVariety) EnumDescriptor ¶
func (TemplateVariety) EnumDescriptor() ([]byte, []int)
func (TemplateVariety) String ¶
func (x TemplateVariety) String() string
type ValidateRequest ¶
type ValidateRequest struct { // Adapter specific configuration. AdapterConfig *google_protobuf2.Any `protobuf:"bytes,1,opt,name=adapter_config,json=adapterConfig" json:"adapter_config,omitempty"` // Map of instance names to their template-specific inferred type. InferredTypes map[string]*google_protobuf2.Any `` /* 174-byte string literal not displayed */ }
Request message for `Validate` method.
func (*ValidateRequest) Descriptor ¶
func (*ValidateRequest) Descriptor() ([]byte, []int)
func (*ValidateRequest) Equal ¶
func (this *ValidateRequest) Equal(that interface{}) bool
func (*ValidateRequest) GetAdapterConfig ¶
func (m *ValidateRequest) GetAdapterConfig() *google_protobuf2.Any
func (*ValidateRequest) GetInferredTypes ¶
func (m *ValidateRequest) GetInferredTypes() map[string]*google_protobuf2.Any
func (*ValidateRequest) GoString ¶
func (this *ValidateRequest) GoString() string
func (*ValidateRequest) Marshal ¶
func (m *ValidateRequest) Marshal() (dAtA []byte, err error)
func (*ValidateRequest) ProtoMessage ¶
func (*ValidateRequest) ProtoMessage()
func (*ValidateRequest) Reset ¶
func (m *ValidateRequest) Reset()
func (*ValidateRequest) Size ¶
func (m *ValidateRequest) Size() (n int)
func (*ValidateRequest) String ¶
func (this *ValidateRequest) String() string
func (*ValidateRequest) Unmarshal ¶
func (m *ValidateRequest) Unmarshal(dAtA []byte) error
type ValidateResponse ¶
type ValidateResponse struct { // The success/failure status of validation call. Status *google_rpc.Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` }
Response message for `Validate` method.
func (*ValidateResponse) Descriptor ¶
func (*ValidateResponse) Descriptor() ([]byte, []int)
func (*ValidateResponse) Equal ¶
func (this *ValidateResponse) Equal(that interface{}) bool
func (*ValidateResponse) GetStatus ¶
func (m *ValidateResponse) GetStatus() *google_rpc.Status
func (*ValidateResponse) GoString ¶
func (this *ValidateResponse) GoString() string
func (*ValidateResponse) Marshal ¶
func (m *ValidateResponse) Marshal() (dAtA []byte, err error)
func (*ValidateResponse) ProtoMessage ¶
func (*ValidateResponse) ProtoMessage()
func (*ValidateResponse) Reset ¶
func (m *ValidateResponse) Reset()
func (*ValidateResponse) Size ¶
func (m *ValidateResponse) Size() (n int)
func (*ValidateResponse) String ¶
func (this *ValidateResponse) String() string
func (*ValidateResponse) Unmarshal ¶
func (m *ValidateResponse) Unmarshal(dAtA []byte) error