istio: istio.io/istio/pkg/mcp/testing/monitoring Index | Files

package monitoring

import "istio.io/istio/pkg/mcp/testing/monitoring"

Index

Package Files

reporter.go

type InMemoryStatsContext Uses

type InMemoryStatsContext struct {
    StreamTotal              int64
    RequestSizesBytes        map[requestKey][]int64
    RequestAcksTotal         map[requestKey]int64
    RequestNacksTotal        map[nackKey]int64
    SendFailuresTotal        map[errorCodeKey]int64
    RecvFailuresTotal        map[errorCodeKey]int64
    StreamCreateSuccessTotal int64
    // contains filtered or unexported fields
}

InMemoryStatsContext enables MCP server metric collection which is stored in memory for testing purposes.

func NewInMemoryStatsContext Uses

func NewInMemoryStatsContext() *InMemoryStatsContext

NewInMemoryStatsContext creates a new context for tracking metrics in memory.

func (*InMemoryStatsContext) Close Uses

func (s *InMemoryStatsContext) Close() error

Close implements io.Closer.

func (*InMemoryStatsContext) RecordRecvError Uses

func (s *InMemoryStatsContext) RecordRecvError(err error, code codes.Code)

RecordRecvError records an error during a network recv with its error string and code.

func (*InMemoryStatsContext) RecordRequestAck Uses

func (s *InMemoryStatsContext) RecordRequestAck(typeURL string, connectionID int64)

RecordRequestAck records an ACK message for a type URL on a connection.

func (*InMemoryStatsContext) RecordRequestNack Uses

func (s *InMemoryStatsContext) RecordRequestNack(typeURL string, connectionID int64, code codes.Code)

RecordRequestNack records a NACK message for a type URL on a connection.

func (*InMemoryStatsContext) RecordRequestSize Uses

func (s *InMemoryStatsContext) RecordRequestSize(typeURL string, connectionID int64, size int)

RecordRequestSize records the size of a request from a connection for a specific type URL.

func (*InMemoryStatsContext) RecordSendError Uses

func (s *InMemoryStatsContext) RecordSendError(err error, code codes.Code)

RecordSendError records an error during a network send with its error string and code.

func (*InMemoryStatsContext) RecordStreamCreateSuccess Uses

func (s *InMemoryStatsContext) RecordStreamCreateSuccess()

RecordStreamCreateSuccess records a successful stream connection.

func (*InMemoryStatsContext) SetStreamCount Uses

func (s *InMemoryStatsContext) SetStreamCount(clients int64)

SetStreamCount updates the current stream count to the given argument.

Package monitoring imports 2 packages (graph) and is imported by 6 packages. Updated 2019-03-29. Refresh now. Tools for package owners.