istio: istio.io/istio/mixer/pkg/attribute Index | Files

package attribute

import "istio.io/istio/mixer/pkg/attribute"

Package attribute is focused on enabling efficient handling and tracking of attribute usage within Mixer.

Index

Package Files

dictState.go doc.go list.gen.go protoBag.go

func GetBagFromProto Uses

func GetBagFromProto(attrs *mixerpb.CompressedAttributes, globalWordList []string) (*attr.MutableBag, error)

GetBagFromProto returns an initialized bag from an Attribute proto.

func GetProtoForTesting Uses

func GetProtoForTesting(v map[string]interface{}) *mixerpb.CompressedAttributes

GetProtoForTesting returns a CompressedAttributes struct based on the specified map Use this function only for testing purposes.

func GlobalList Uses

func GlobalList() []string

func ToProto Uses

func ToProto(mb *attr.MutableBag, output *mixerpb.CompressedAttributes, globalDict map[string]int32, globalWordCount int)

ToProto fills-in an Attributes proto based on the content of the bag.

func UpdateBagFromProto Uses

func UpdateBagFromProto(mb *attr.MutableBag, attrs *mixerpb.CompressedAttributes, globalWordList []string) error

UpdateBagFromProto refreshes the bag based on the content of the attribute proto.

Note that in the case of semantic errors in the supplied proto which leads to an error return, it's likely that the bag will have been partially updated.

type Bag Uses

type Bag = attr.Bag

Exports of types for backwards compatibility

type MutableBag Uses

type MutableBag = attr.MutableBag

Exports of types for backwards compatibility

type ProtoBag Uses

type ProtoBag struct {
    // contains filtered or unexported fields
}

ProtoBag implements the Bag interface on top of an Attributes proto.

func GetProtoBag Uses

func GetProtoBag(proto *mixerpb.CompressedAttributes, globalDict map[string]int32, globalWordList []string) *ProtoBag

GetProtoBag returns a proto-based attribute bag. When you are done using the proto bag, call the Done method to recycle it.

func (*ProtoBag) Clear Uses

func (pb *ProtoBag) Clear()

Clear the list of referenced attributes being tracked by this bag

func (*ProtoBag) Contains Uses

func (pb *ProtoBag) Contains(key string) bool

Contains returns true if protobag contains this key.

func (*ProtoBag) Done Uses

func (pb *ProtoBag) Done()

Done indicates the bag can be reclaimed.

func (*ProtoBag) Get Uses

func (pb *ProtoBag) Get(name string) (interface{}, bool)

Get returns an attribute value.

func (*ProtoBag) GetReferencedAttributes Uses

func (pb *ProtoBag) GetReferencedAttributes(globalDict map[string]int32, globalWordCount int) *mixerpb.ReferencedAttributes

GetReferencedAttributes returns the set of attributes that have been referenced through this bag.

func (*ProtoBag) MapReference Uses

func (pb *ProtoBag) MapReference(name string, key string, condition attr.Presence)

func (*ProtoBag) Names Uses

func (pb *ProtoBag) Names() []string

Names returns the names of all the attributes known to this bag.

func (*ProtoBag) Reference Uses

func (pb *ProtoBag) Reference(name string, condition attr.Presence)

func (*ProtoBag) ReferenceTracker Uses

func (pb *ProtoBag) ReferenceTracker() attr.ReferenceTracker

ReferenceTracker for a proto bag

func (*ProtoBag) Reset Uses

func (pb *ProtoBag) Reset()

Reset removes all local state.

func (*ProtoBag) Restore Uses

func (pb *ProtoBag) Restore(snap attr.ReferencedAttributeSnapshot)

Restore the list of referenced attributes being tracked by this bag

func (*ProtoBag) Snapshot Uses

func (pb *ProtoBag) Snapshot() attr.ReferencedAttributeSnapshot

Snapshot grabs a snapshot of the currently referenced attributes

func (*ProtoBag) String Uses

func (pb *ProtoBag) String() string

String runs through the named attributes, looks up their values, and prints them to a string.

Package attribute imports 10 packages (graph) and is imported by 19 packages. Updated 2019-10-09. Refresh now. Tools for package owners.