ale

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadataAttributes

func GetMetadataAttributes(metadata string) (map[string]interface{}, error)

Types

type AuthInfo

type AuthInfo struct {
	RequestPrincipal string `json:"requestPrincipal,omitempty"`
	Principal        string `json:"principal,omitempty"`
	Namespace        string `json:"namespace,omitempty"`
	User             string `json:"user,omitempty"`
}

type HTTPAccessLogEntry

type HTTPAccessLogEntry struct {
	Reporter        *Reporter         `json:"reporter"`
	Direction       string            `json:"direction"`
	StartTime       string            `json:"startTime"`
	UpstreamCluster string            `json:"upstreamCluster"`
	Source          *RequestEndpoint  `json:"source"`
	Destination     *RequestEndpoint  `json:"destination"`
	Request         *HTTPRequest      `json:"request"`
	Response        *HTTPResponse     `json:"response"`
	Latency         *time.Duration    `json:"latency"`
	Durations       *RequestDurations `json:"durations"`
	ProtocolVersion string            `json:"protocolVersion"`
	AuthInfo        *AuthInfo         `json:"authInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*HTTPAccessLogEntry) FormatedStartTime

func (e *HTTPAccessLogEntry) FormatedStartTime(format ...string) string

func (*HTTPAccessLogEntry) FormattedResponseFlags

func (e *HTTPAccessLogEntry) FormattedResponseFlags() string

func (*HTTPAccessLogEntry) FormattedString

func (e *HTTPAccessLogEntry) FormattedString(tpl *template.Template) string

func (*HTTPAccessLogEntry) GetUniqueKey

func (e *HTTPAccessLogEntry) GetUniqueKey(byWorkload bool) string

func (*HTTPAccessLogEntry) LatencyInMiliseconds

func (e *HTTPAccessLogEntry) LatencyInMiliseconds() int64

func (*HTTPAccessLogEntry) RequestBytes

func (e *HTTPAccessLogEntry) RequestBytes() uint64

func (*HTTPAccessLogEntry) ResponseBytes

func (e *HTTPAccessLogEntry) ResponseBytes() uint64

func (*HTTPAccessLogEntry) SetReporter

func (*HTTPAccessLogEntry) String

func (e *HTTPAccessLogEntry) String() string

type HTTPRequest

type HTTPRequest struct {
	ID           string `json:"id"`
	Method       string `json:"method"`
	Scheme       string `json:"scheme"`
	Authority    string `json:"authority"`
	Path         string `json:"path"`
	UserAgent    string `json:"userAgent,omitempty"`
	Referer      string `json:"referer,omitempty"`
	ForwardedFor string `json:"forwardedFor,omitempty"`
	OriginalPath string `json:"originalPath,omitempty"`

	HeaderBytes uint64            `json:"headerBytes"`
	BodyBytes   uint64            `json:"bodyBytes"`
	Metadata    map[string]string `json:"metadata,omitempty"`
	Headers     map[string]string `json:"headers,omitempty"`
}

func (*HTTPRequest) IsIdentifiable

func (r *HTTPRequest) IsIdentifiable()

type HTTPResponse

type HTTPResponse struct {
	StatusCode        uint32   `json:"statusCode"`
	StatusCodeDetails string   `json:"statusCodeDetails"`
	Flags             []string `json:"flags"`

	HeaderBytes uint64            `json:"headerBytes"`
	BodyBytes   uint64            `json:"bodyBytes"`
	Metadata    map[string]string `json:"metadata,omitempty"`
	Headers     map[string]string `json:"headers,omitempty"`
	Trailers    map[string]string `json:"trailers,omitempty"`
}

type Headers

type Headers map[string]string

func (Headers) GetAllWithoutMetadataHeaders

func (hs Headers) GetAllWithoutMetadataHeaders() (headers map[string]string)

func (Headers) GetMetadata

func (hs Headers) GetMetadata() (md string)

type Owner

type Owner struct {
	Raw       string `json:"raw,omitempty"`
	Type      string `json:"type,omitempty"`
	Name      string `json:"name,omitempty"`
	Namespace string `json:"namespace,omitempty"`
}

type Reporter

type Reporter struct {
	ID             string            `json:"id,omitempty"`
	Owner          *Owner            `json:"owner,omitempty"`
	ClusterID      string            `json:"clusterID,omitempty"`
	InstanceIPs    []string          `json:"instanceIPs,omitempty"`
	IstioVersion   string            `json:"istioVersion,omitempty"`
	MeshID         string            `json:"meshID,omitempty"`
	Name           string            `json:"name,omitempty"`
	Namespace      string            `json:"namespace,omitempty"`
	Workload       string            `json:"workload,omitempty"`
	ServiceAccount string            `json:"serviceAccount,omitempty"`
	Metadata       map[string]string `json:"metadata,omitempty"`
}

func (*Reporter) IsIdentifiable

func (re *Reporter) IsIdentifiable()

func (*Reporter) SetAttributes

func (re *Reporter) SetAttributes(attrs map[string]interface{})

type RequestDurations

type RequestDurations struct {
	// time it takes to receive a request
	TimeToLastRxByte *time.Duration `json:"timeToLastRxByte,omitempty"`
	// time it takes to send out a request from the proxy
	TimeToFirstUpstreamTxByte *time.Duration `json:"timeToFirstUpstreamTxByte,omitempty"`
	// time it takes for a request to be sent from the proxy
	TimeToLastUpstreamTxByte *time.Duration `json:"timeToLastUpstreamTxByte,omitempty"`
	// time it takes to start receiving a response
	TimeToFirstUpstreamRxByte *time.Duration `json:"timeToFirstUpstreamRxByte,omitempty"`
	// time it takes to receive a complete response
	TimeToLastUpstreamRxByte *time.Duration `json:"timeToLastUpstreamRxByte,omitempty"`
	// time it takes to start sending a response to downstream
	TimeToFirstDownstreamTxByte *time.Duration `json:"timeToFirstDownstreamTxByte,omitempty"`
	// time it takes to send a complete response to downstream
	TimeToLastDownstreamTxByte *time.Duration `json:"timeToLastDownstreamTxByte,omitempty"`
}

type RequestEndpoint

type RequestEndpoint struct {
	Address        *TCPAddr          `json:"address"`
	Name           string            `json:"name,omitempty"`
	Namespace      string            `json:"namespace,omitempty"`
	Workload       string            `json:"workload,omitempty"`
	ServiceAccount string            `json:"serviceAccount,omitempty"`
	Metadata       map[string]string `json:"metadata,omitempty"`
}

func (*RequestEndpoint) SetAttributes

func (re *RequestEndpoint) SetAttributes(attrs map[string]interface{})

func (*RequestEndpoint) String

func (re *RequestEndpoint) String() string

type TCPAddr

type TCPAddr struct {
	IP   string `json:"ip"`
	Port int    `json:"port"`
}

func (*TCPAddr) String

func (a *TCPAddr) String() string

Jump to

Keyboard shortcuts

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