utils

package
v0.46.0-devel Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pb2TaggerCardinality

func Pb2TaggerCardinality(pbCardinality pb.TagCardinality) (collectors.TagCardinality, error)

Pb2TaggerCardinality helper to convert protobuf cardinality to native tag cardinality.

func Pb2TaggerEntityID

func Pb2TaggerEntityID(entityID *pb.EntityId) (string, error)

Pb2TaggerEntityID helper to convert a protobuf Entity ID to its expected format.

func ProtoCopier

func ProtoCopier(v interface{}) func(v interface{}) interface{}

ProtoCopier returns a function that will shallow copy values of a given protobuf value's type, utilising any `Get` prefixed method, accepting no input parameters, and returning a single value of the same type, available for each given field, intended to be be used with generated code for protobuf messages NOTE a panic will occur if the v's type is not t

func ProtobufEventFromWorkloadmetaEvent

func ProtobufEventFromWorkloadmetaEvent(event workloadmeta.Event) (*pb.WorkloadmetaEvent, error)

ProtobufEventFromWorkloadmetaEvent converts the given workloadmeta.Event into protobuf

func Tagger2PbEntityEvent

func Tagger2PbEntityEvent(event types.EntityEvent) (*pb.StreamTagsEvent, error)

Tagger2PbEntityEvent helper to convert a native EntityEvent type to its protobuf representation.

func Tagger2PbEntityID

func Tagger2PbEntityID(entityID string) (*pb.EntityId, error)

Tagger2PbEntityID helper to convert an Entity ID to its expected protobuf format.

func WorkloadmetaEventFromProtoEvent

func WorkloadmetaEventFromProtoEvent(protoEvent *pb.WorkloadmetaEvent) (workloadmeta.Event, error)

WorkloadmetaEventFromProtoEvent converts the given protobuf workloadmeta event into a workloadmeta.Event

func WorkloadmetaFilterFromProtoFilter

func WorkloadmetaFilterFromProtoFilter(protoFilter *pb.WorkloadmetaFilter) (*workloadmeta.Filter, error)

WorkloadmetaFilterFromProtoFilter converts the given protobuf filter into a workloadmeta.Filter

Types

This section is empty.

Jump to

Keyboard shortcuts

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