...

Package jsonpath

import "github.com/linkerd/linkerd2/viz/pkg/jsonpath"
Overview
Index

Overview ▾

func GetFormatedJSONPathExpression

func GetFormatedJSONPathExpression(pathExpression string) (string, error)

GetFormatedJSONPathExpression get jsonpath filter from flag and attempts to be flexible with JSONPath expressions, it accepts:

And transforms them all into a valid jsonpath expression:

{.metadata.name}

func GetJsonFilteredByJPath

func GetJsonFilteredByJPath(event interface{}, jsonPath string) ([]string, error)

func GetJsonPathFlagVal

func GetJsonPathFlagVal(flagVal string) (string, error)