Documentation ¶
Index ¶
Constants ¶
View Source
const ( IstioProxyTotalRequestsCMD = "pilot-agent request GET stats?format=json&filter=istio_requests_total\\.*reporter\\.source" IstioSidecarContainerName = "istio-proxy" IstioPodsLabelSelector = "security.istio.io/tlsMode" MetricsBufferedChannelSize = 100 )
Envoy metric sample { "name": "istiocustom.istio_requests_total.reporter.source.source_workload.sleep.source_canonical_service.sleep
.source_canonical_revision.latest.source_workload_namespace.default.source_principal.unknown.source_app .sleep.source_version.source_cluster.Kubernetes.destination_workload.unknown.destination_workload_namespace .unknown.destination_principal.unknown.destination_app.unknown.destination_version.unknown.destination_service .security.ubuntu.com.destination_canonical_service.unknown.destination_canonical_revision.latest .destination_service_name.PassthroughCluster.destination_service_namespace.unknown.destination_cluster .unknown.request_protocol.http.response_code.200.grpc_response_status.response_flags.- .connection_security_policy.unknown.request_path./ubuntu/dists/jammy-security/InRelease" }
Variables ¶
View Source
var ( ConnectionInfoInsufficient = errors.New("connection info partial or empty") GroupNames = []string{ "source_workload", "source_workload_namespace", "destination_workload", "destination_service_name", "destination_workload_namespace", "request_method", "request_path", } )
View Source
var HTTPMethodsToGQLMethods = map[string]model.HTTPMethod{ http.MethodGet: model.HTTPMethodGet, http.MethodPost: model.HTTPMethodPost, http.MethodPut: model.HTTPMethodPut, http.MethodDelete: model.HTTPMethodDelete, http.MethodOptions: model.HTTPMethodOptions, http.MethodTrace: model.HTTPMethodTrace, http.MethodPatch: model.HTTPMethodPatch, http.MethodConnect: model.HTTPMethodConnect, }
Functions ¶
func ToGraphQLIstioConnections ¶
func ToGraphQLIstioConnections(connections map[ConnectionWithPath]time.Time) []model.IstioConnection
Types ¶
type ConnectionPairWithPath ¶
type ConnectionWithPath ¶
type ConnectionWithPath struct { SourceWorkload string `json:"source_workload"` SourceNamespace string `json:"source_workload_namespace"` DestinationWorkload string `json:"destination_workload"` DestinationServiceName string `json:"destination_service_name"` DestinationNamespace string `json:"destination_workload_namespace"` RequestPath string `json:"request_path"` RequestMethod string `json:"request_method"` }
type EnvoyMetrics ¶
type EnvoyMetrics struct {
Stats []Metric `json:"stats"`
}
type IstioConnectionResultMatcher ¶
type IstioConnectionResultMatcher struct {
model.IstioConnectionResults
}
IstioConnectionResultMatcher Implement gomock.Matcher interface for []model.IstioConnectionResults
func GetMatcher ¶
func GetMatcher(results model.IstioConnectionResults) *IstioConnectionResultMatcher
func (*IstioConnectionResultMatcher) Matches ¶
func (m *IstioConnectionResultMatcher) Matches(x interface{}) bool
func (*IstioConnectionResultMatcher) String ¶
func (m *IstioConnectionResultMatcher) String() string
type IstioReporter ¶
type IstioWatcher ¶
type IstioWatcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶
func NewWatcher(resolver IstioReporter) (*IstioWatcher, error)
NewWatcher The Istio watcher uses this interface because it used to be a standalone component that communicates with the network mapper, and was then integrated into the network mapper.
func (*IstioWatcher) CollectIstioConnectionMetrics ¶
func (m *IstioWatcher) CollectIstioConnectionMetrics(ctx context.Context, namespace string) error
func (*IstioWatcher) Flush ¶
func (m *IstioWatcher) Flush() map[ConnectionWithPath]time.Time
func (*IstioWatcher) ReportResults ¶
func (m *IstioWatcher) ReportResults(ctx context.Context)
func (*IstioWatcher) RunForever ¶
func (m *IstioWatcher) RunForever(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.