tags

package
v0.0.0-...-83c1a15 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TagsHeaderName = "x-dubbo-tags"

Variables

This section is empty.

Functions

func MatchingRegex

func MatchingRegex(tags mesh_proto.SingleValueTagSet) string

func RegexOR

func RegexOR(r ...string) string

func Serialize

func Serialize(tags mesh_proto.MultiValueTagSet) string

func ServiceFromClusterName

func ServiceFromClusterName(name string) string

Types

type TagKeyTransformer

type TagKeyTransformer interface {
	Apply(slice TagKeys) TagKeys
}

func With

func With(tags ...string) TagKeyTransformer

func Without

func Without(tags ...string) TagKeyTransformer

type TagKeyTransformerFunc

type TagKeyTransformerFunc func(slice TagKeys) TagKeys

func (TagKeyTransformerFunc) Apply

func (f TagKeyTransformerFunc) Apply(slice TagKeys) TagKeys

type TagKeys

type TagKeys []string

func (TagKeys) Transform

func (t TagKeys) Transform(transformers ...TagKeyTransformer) TagKeys

Transform applies a list of transformers on the tag keys and return a new set of keys (always return sorted, unique sets).

type TagKeysSlice

type TagKeysSlice []TagKeys

func TagKeySlice

func TagKeySlice(tags []Tags) TagKeysSlice

func (TagKeysSlice) Transform

func (t TagKeysSlice) Transform(transformers ...TagKeyTransformer) TagKeysSlice

Transform applies each transformer to each TagKeys and returns a sorted unique TagKeysSlice.

type Tags

type Tags map[string]string

func DistinctTags

func DistinctTags(tags []Tags) []Tags

func TagsFromString

func TagsFromString(tagsString string) (Tags, error)

func (Tags) DestinationClusterName

func (t Tags) DestinationClusterName(
	additionalIdentifyingTags map[string]string,
) (string, error)

DestinationClusterName generates a unique cluster name for the destination. identifyingTags are useful for adding extra metadata outside of just tags. Tags must at least contain `dubbo.io/service`

func (Tags) Keys

func (t Tags) Keys() TagKeys

func (Tags) String

func (t Tags) String() string

func (Tags) WithTags

func (t Tags) WithTags(keysAndValues ...string) Tags

func (Tags) WithoutTags

func (t Tags) WithoutTags(tags ...string) Tags

type TagsSlice

type TagsSlice []Tags

func (TagsSlice) ToTagKeysSlice

func (t TagsSlice) ToTagKeysSlice() TagKeysSlice

Jump to

Keyboard shortcuts

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