config

package
v0.0.0-...-a1f2fe4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package config is a generated protocol buffer package.

It is generated from these files:

mixer/pkg/aspect/config/attrgen.proto
mixer/pkg/aspect/config/lists.proto
mixer/pkg/aspect/config/quotas.proto

It has these top-level messages:

AttributesGeneratorParams
ListsParams
QuotasParams

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAttrgen = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAttrgen   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthLists = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLists   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthQuotas = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuotas   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type AttributesGeneratorParams

type AttributesGeneratorParams struct {
	// Map of input params name to attribute expressions. At runtime, each
	// expression will be evaluated to determine the input value provided to the
	// aspect.
	InputExpressions map[string]string `` /* 190-byte string literal not displayed */
	// Map of attribute descriptor names to the names of values produced by
	// an adapter. This map will be used to translate from adapter outputs into
	// mixer attributes.
	AttributeBindings map[string]string `` /* 193-byte string literal not displayed */
}

Configures an AttributesGenerator aspect.

The following config specifies two adapters (mixer_info and k8s_pod_info) that will be used to generate attributes for use within in Mixer:

aspects:

  • kind: attributes adapter: mixer_info params: attribute_bindings: mixer_version: version mixer_build_id: buildID mixer_build_status: buildStatus
  • kind: attributes adapter: k8s_pod_info params: input_expressions: srcIP: source.ip | "unknown" tgtIP: target.ip | "unknown" attribute_bindings: source_name: srcName target_name: tgtName

The mixer_info adapter takes no input arguments and produces three output values (version, buildID, and buildStatus). Those three output values are mapped into three attributes (mixer_version, mixer_build_id, and mixer_build_status) via the attribute_bindings.

Similarly, the k8s_pod_info adapter takes two inputs (srcIp and tgtIp). Their values are generated from the expressions that reference mixer attributes. The adapter produces two outputs (srcName and tgtName) that are mapped into mixer attributes (source_name and target_name) by the attribute_bindings.

func (*AttributesGeneratorParams) Descriptor

func (*AttributesGeneratorParams) Descriptor() ([]byte, []int)

func (*AttributesGeneratorParams) Marshal

func (m *AttributesGeneratorParams) Marshal() (dAtA []byte, err error)

func (*AttributesGeneratorParams) MarshalTo

func (m *AttributesGeneratorParams) MarshalTo(dAtA []byte) (int, error)

func (*AttributesGeneratorParams) ProtoMessage

func (*AttributesGeneratorParams) ProtoMessage()

func (*AttributesGeneratorParams) Reset

func (m *AttributesGeneratorParams) Reset()

func (*AttributesGeneratorParams) Size

func (m *AttributesGeneratorParams) Size() (n int)

func (*AttributesGeneratorParams) String

func (this *AttributesGeneratorParams) String() string

func (*AttributesGeneratorParams) Unmarshal

func (m *AttributesGeneratorParams) Unmarshal(dAtA []byte) error

type ListsParams

type ListsParams struct {
	// blacklist determines if this behaves like a blacklist
	// default is whitelist
	Blacklist bool `protobuf:"varint,1,opt,name=blacklist,proto3" json:"blacklist,omitempty"`
	// check_expression is the expression evaluated at runtime to derive the value that is checked against the list
	CheckExpression string `protobuf:"bytes,2,opt,name=check_expression,json=checkExpression,proto3" json:"check_expression,omitempty"`
}

Configures a lists aspect.

Example:

   kind: lists
   params:
	    blacklist: true
     check_expression: source.ip

func (*ListsParams) Descriptor

func (*ListsParams) Descriptor() ([]byte, []int)

func (*ListsParams) Marshal

func (m *ListsParams) Marshal() (dAtA []byte, err error)

func (*ListsParams) MarshalTo

func (m *ListsParams) MarshalTo(dAtA []byte) (int, error)

func (*ListsParams) ProtoMessage

func (*ListsParams) ProtoMessage()

func (*ListsParams) Reset

func (m *ListsParams) Reset()

func (*ListsParams) Size

func (m *ListsParams) Size() (n int)

func (*ListsParams) String

func (this *ListsParams) String() string

func (*ListsParams) Unmarshal

func (m *ListsParams) Unmarshal(dAtA []byte) error

type QuotasParams

type QuotasParams struct {
	// The set of quotas that will be populated and handed to aspects at run time.
	Quotas []*QuotasParams_Quota `protobuf:"bytes,1,rep,name=quotas" json:"quotas,omitempty"`
}

Configures a quotas aspect.

func (*QuotasParams) Descriptor

func (*QuotasParams) Descriptor() ([]byte, []int)

func (*QuotasParams) Marshal

func (m *QuotasParams) Marshal() (dAtA []byte, err error)

func (*QuotasParams) MarshalTo

func (m *QuotasParams) MarshalTo(dAtA []byte) (int, error)

func (*QuotasParams) ProtoMessage

func (*QuotasParams) ProtoMessage()

func (*QuotasParams) Reset

func (m *QuotasParams) Reset()

func (*QuotasParams) Size

func (m *QuotasParams) Size() (n int)

func (*QuotasParams) String

func (this *QuotasParams) String() string

func (*QuotasParams) Unmarshal

func (m *QuotasParams) Unmarshal(dAtA []byte) error

type QuotasParams_Quota

type QuotasParams_Quota struct {
	// Must match the name of some quota_descriptor in the global config.
	DescriptorName string `protobuf:"bytes,1,opt,name=descriptor_name,json=descriptorName,proto3" json:"descriptor_name,omitempty"`
	// Map of quota_descriptor label name to attribute expression. At run time each
	// expression will be evaluated to determine the value provided to the aspect. The
	// result of evaluating the expression must match the ValueType of the label in the quota_descriptor.
	Labels map[string]string `` /* 146-byte string literal not displayed */
	// The upper limit for this quota.
	MaxAmount int64 `protobuf:"varint,3,opt,name=max_amount,json=maxAmount,proto3" json:"max_amount,omitempty"`
	// The amount of time allocated quota remains valid before it is
	// automatically released. This is only meaningful for quotas
	// annotated as rate limits, otherwise the value must be zero.
	Expiration time.Duration `protobuf:"bytes,4,opt,name=expiration,stdduration" json:"expiration"`
}

func (*QuotasParams_Quota) Descriptor

func (*QuotasParams_Quota) Descriptor() ([]byte, []int)

func (*QuotasParams_Quota) Marshal

func (m *QuotasParams_Quota) Marshal() (dAtA []byte, err error)

func (*QuotasParams_Quota) MarshalTo

func (m *QuotasParams_Quota) MarshalTo(dAtA []byte) (int, error)

func (*QuotasParams_Quota) ProtoMessage

func (*QuotasParams_Quota) ProtoMessage()

func (*QuotasParams_Quota) Reset

func (m *QuotasParams_Quota) Reset()

func (*QuotasParams_Quota) Size

func (m *QuotasParams_Quota) Size() (n int)

func (*QuotasParams_Quota) String

func (this *QuotasParams_Quota) String() string

func (*QuotasParams_Quota) Unmarshal

func (m *QuotasParams_Quota) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL