Documentation ¶
Index ¶
- Constants
- func FormatAttributesString(attributes *v1.Attributes) (str string, err error)
- func GetDestinationUID(metadata api.Metadata) (uid string, err error)
- func GetIPPort(address net.Addr) (ip string, port int32, ret bool)
- type AttributesBuilder
- func (a *AttributesBuilder) AddBool(key string, value bool)
- func (a *AttributesBuilder) AddBytes(key string, data []byte)
- func (a *AttributesBuilder) AddDouble(key string, value float64)
- func (a *AttributesBuilder) AddDuration(key string, value time.Duration)
- func (a *AttributesBuilder) AddInt64(key string, data int64)
- func (a *AttributesBuilder) AddString(key string, value string)
- func (a *AttributesBuilder) AddStringMap(key string, stringMap types.HeaderMap)
- func (a *AttributesBuilder) AddTimestamp(key string, t time.Time)
- func (a *AttributesBuilder) HasAttribute(key string) bool
Constants ¶
View Source
const ( // KContextProtocol const string KContextProtocol = "context.protocol" // KDestinationIP const string KDestinationIP = "destination.ip" // KDestinationPort const string KDestinationPort = "destination.port" // KOriginIP const string KOriginIP = "origin.ip" // KRequestTime const string KRequestTime = "request.time" // KRequestBodySize const string KRequestBodySize = "request.size" // const string KRequestTotalSize = "request.total_size" // KResponseCode const string KResponseCode = "response.code" // KResponseDuration const string KResponseDuration = "response.duration" // KResponseHeaders const string KResponseHeaders = "response.headers" // KResponseBodySize const string KResponseBodySize = "response.size" // KResponseTotalSize const string KResponseTotalSize = "response.total_size" // KResponseTime const string KResponseTime = "response.time" // KRequestHeaders const string KRequestHeaders = "request.headers" // KRequestPath const string KRequestPath = "request.path" // KRequestUrlPath const string KRequestUrlPath = "request.url_path" // KRequestQueryParms const string KRequestQueryParms = "request.query_params" // KRequestMethod const string KRequestMethod = "request.method" // KRequestHost const string KRequestHost = "request.host" // KDestinationServiceHost const string KDestinationServiceHost = "destination.service.host" // KDestinationServiceName const string KDestinationServiceName = "destination.service.name" // KDestinationServiceNamespace const string KDestinationServiceNamespace = "destination.service.namespace" // KContextReporterKind const string KContextReporterKind = "context.reporter.kind" )
Define attribute names
View Source
const (
// KIstioAttributeHeader is the istio attribute name
KIstioAttributeHeader = "x-istio-attributes"
)
Variables ¶
This section is empty.
Functions ¶
func FormatAttributesString ¶
func FormatAttributesString(attributes *v1.Attributes) (str string, err error)
FormatAttributesString return attributes json string
func GetDestinationUID ¶
GetDestinationUID function
Types ¶
type AttributesBuilder ¶
type AttributesBuilder struct {
// contains filtered or unexported fields
}
AttributesBuilder to add attribute to protobuf Attributes.
func NewAttributesBuilder ¶
func NewAttributesBuilder(attributes *v1.Attributes) *AttributesBuilder
NewAttributesBuilder return AttributesBuilder
func (*AttributesBuilder) AddBool ¶
func (a *AttributesBuilder) AddBool(key string, value bool)
AddBool function
func (*AttributesBuilder) AddBytes ¶
func (a *AttributesBuilder) AddBytes(key string, data []byte)
AddBytes function
func (*AttributesBuilder) AddDouble ¶
func (a *AttributesBuilder) AddDouble(key string, value float64)
AddDouble function
func (*AttributesBuilder) AddDuration ¶
func (a *AttributesBuilder) AddDuration(key string, value time.Duration)
AddDuration function
func (*AttributesBuilder) AddInt64 ¶
func (a *AttributesBuilder) AddInt64(key string, data int64)
AddInt64 function
func (*AttributesBuilder) AddString ¶
func (a *AttributesBuilder) AddString(key string, value string)
AddString function
func (*AttributesBuilder) AddStringMap ¶
func (a *AttributesBuilder) AddStringMap(key string, stringMap types.HeaderMap)
AddStringMap function
func (*AttributesBuilder) AddTimestamp ¶
func (a *AttributesBuilder) AddTimestamp(key string, t time.Time)
AddTimestamp function
func (*AttributesBuilder) HasAttribute ¶
func (a *AttributesBuilder) HasAttribute(key string) bool
HasAttribute function
Click to show internal directories.
Click to hide internal directories.