shuttle

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerToProc

func ContainerToProc(container string) events.Process

func IsAppMatch

func IsAppMatch(potential string, app_name string) bool

func KubernetesToHumanReadable

func KubernetesToHumanReadable(message string) string

func ParseBuildLogMessage

func ParseBuildLogMessage(data []byte, msg *events.LogSpec) bool

func ParseIstioFromEnvoyWebLogMessage added in v1.0.3

func ParseIstioFromEnvoyWebLogMessage(data []byte, msg *events.LogSpec) bool

func ParseIstioWebLogMessage

func ParseIstioWebLogMessage(data []byte, msg *events.LogSpec) bool

func ParseWebLogMessage

func ParseWebLogMessage(data []byte, msg *events.LogSpec) bool

func RandomString

func RandomString(n int) string

func StringToIntOrZero added in v1.0.3

func StringToIntOrZero(target *string) int

func WriteAndFlush

func WriteAndFlush(log string, res http.ResponseWriter) error

Types

type CommonProperties added in v1.0.3

type CommonProperties struct {
	StartTime                   *time.Time     `json:"start_time"`
	TimeToLastRxByte            *Duration      `json:"time_to_last_rx_byte"`
	TimeToFirstUpstreamTxByte   *Duration      `json:"time_to_first_upstream_tx_byte"`
	TimeToLastUpstreamTxByte    *Duration      `json:"time_to_last_upstream_tx_byte"`
	TimeToFirstUpstreamRxByte   *Duration      `json:"time_to_first_upstream_rx_byte"`
	TimeToLastUpstreamRxByte    *Duration      `json:"time_to_last_upstream_rx_byte"`
	TimeToFirstDownstreamTxByte *Duration      `json:"time_to_first_downstream_tx_byte"`
	TimeToLastDownstreamTxByte  *Duration      `json:"time_to_last_downstream_tx_byte"`
	UpstreamCluster             string         `json:"upstream_cluster"`
	ResponseFlags               *ResponseFlags `json:"response_flags,omitempty"`
	TLSProperties               *TLSProperties `json:"tls_properties,omitempty"`
}

type Destination

type Destination struct {
	// contains filtered or unexported fields
}

type Duration added in v1.0.5

type Duration struct {
	time.Duration
}

func (Duration) MarshalJSON added in v1.0.5

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) StringMilliseconds added in v1.0.5

func (d *Duration) StringMilliseconds() string

func (*Duration) UnmarshalJSON added in v1.0.5

func (d *Duration) UnmarshalJSON(b []byte) error

type EnvoyAlsServer added in v1.0.3

type EnvoyAlsServer struct {
	// contains filtered or unexported fields
}

func (*EnvoyAlsServer) Close added in v1.0.3

func (s *EnvoyAlsServer) Close()

func (*EnvoyAlsServer) StartEnvoyALSAdapter added in v1.0.3

func (s *EnvoyAlsServer) StartEnvoyALSAdapter(port int, producer events.LogProducer)

func (*EnvoyAlsServer) StreamAccessLogs added in v1.0.3

func (s *EnvoyAlsServer) StreamAccessLogs(stream v2.AccessLogService_StreamAccessLogsServer) error

type Request added in v1.0.3

type Request struct {
	RequestMethod       string  `json:"request_method"`
	Authority           string  `json:"authority"`
	Path                string  `json:"path"`
	UserAgent           string  `json:"user_agent"`
	ForwardedFor        string  `json:"forwarded_for"`
	RequestId           string  `json:"request_id"`
	OriginalPath        string  `json:"original_path,omitempty"`
	RequestHeadersBytes string  `json:"request_headers_bytes"`
	RequestBodyBytes    *string `json:"request_body_bytes,omitempty"`
}

type Response added in v1.0.3

type Response struct {
	ResponseCode         *uint32 `json:"response_code"`
	ResponseHeadersBytes string  `json:"response_headers_bytes"`
	ResponseBodyBytes    *string `json:"response_body_bytes,omitempty"`
}

type ResponseFlags added in v1.0.3

type ResponseFlags struct {
	FailedLocalHealthcheck          bool `json:"failed_local_healthcheck,omitempty"`
	NoHealthyUpstream               bool `json:"no_healthy_upstream,omitempty"`
	UpstreamRequestTimeout          bool `json:"upstream_request_timeout,omitempty"`
	LocalReset                      bool `json:"local_reset,omitempty"`
	UpstreamRemoteReset             bool `json:"upstream_remote_reset,omitempty"`
	UpstreamConnectionFailure       bool `json:"upstream_connection_failure,omitempty"`
	UpstreamConnectionTermination   bool `json:"upstream_connection_termination,omitempty"`
	UpstreamOverflow                bool `json:"upstream_overflow,omitempty"`
	NoRouteFound                    bool `json:"no_route_found,omitempty"`
	DelayInjected                   bool `json:"delay_injected,omitempty"`
	FaultInjected                   bool `json:"fault_injected,omitempty"`
	RateLimited                     bool `json:"rate_limited,omitempty"`
	RateLimitServiceError           bool `json:"rate_limit_service_error,omitempty"`
	DownstreamConnectionTermination bool `json:"downstream_connection_termination,omitempty"`
	UpstreamRetryLimitExceeded      bool `json:"upstream_retry_limit_exceeded,omitempty"`
	StreamIdleTimeout               bool `json:"stream_idle_timeout,omitempty"`
	InvalidEnvoyRequestHeaders      bool `json:"invalid_envoy_request_headers,omitempty"`
	DownstreamProtocolError         bool `json:"downstream_protocol_error,omitempty"`
}

type Session

type Session struct {
	IsOpen bool
	// contains filtered or unexported fields
}

func (*Session) ConsumeAndRespond

func (ls *Session) ConsumeAndRespond(kafkaAddrs []string, app string, space string, site string, req *http.Request, res http.ResponseWriter)

func (*Session) RespondWithAppLog

func (ls *Session) RespondWithAppLog(e *kafka.Message) error

func (*Session) RespondWithBuildLog

func (ls *Session) RespondWithBuildLog(e *kafka.Message) error

func (*Session) RespondWithIstioWebLog

func (ls *Session) RespondWithIstioWebLog(e *kafka.Message) error

func (*Session) RespondWithIstioWebLogFromEnvoyAls added in v1.0.3

func (ls *Session) RespondWithIstioWebLogFromEnvoyAls(e *kafka.Message) error

func (*Session) RespondWithWebLog

func (ls *Session) RespondWithWebLog(e *kafka.Message) error

type Shuttle

type Shuttle struct {
	// contains filtered or unexported fields
}

func (*Shuttle) Close

func (sh *Shuttle) Close()

func (*Shuttle) EnableTestMode

func (sh *Shuttle) EnableTestMode()

func (*Shuttle) Init

func (sh *Shuttle) Init(client *storage.Storage, kafkaAddrs []string, kafkaGroup string) error

func (*Shuttle) PrintMetrics

func (sh *Shuttle) PrintMetrics()

func (*Shuttle) Refresh

func (sh *Shuttle) Refresh()

func (*Shuttle) RefreshRoutes

func (sh *Shuttle) RefreshRoutes()

func (*Shuttle) RefreshTopics

func (sh *Shuttle) RefreshTopics()

func (*Shuttle) SendMessage

func (sh *Shuttle) SendMessage(message events.LogSpec)

type TLSProperties added in v1.0.3

type TLSProperties struct {
	TLSVersion     *string `json:"tls_version,omitempty"`
	TLSSNIHostname *string `json:"tls_sni_hostname,omitempty"`
}

Jump to

Keyboard shortcuts

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