testhelpers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

This Code was generated by counterfeiter, but we had to edit it - see below. This is a result of gRPC breaking change referenced here: https://github.com/cloudfoundry/go-loggregator/issues/146 The command to generate this file is: `counterfeiter -o testhelpers/ vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/ingress_grpc.pb.go IngressServer` After generating the file, loggregator_v2.UnimplementedIngressServer will need to be embedded in the FakeIngressServer struct. If this file needs to be generated again, the above changes will need to be reapplied. In order to pass the linter checks the function `(fake *FakeIngressServer) mustEmbedUnimplementedIngressServer()` should be removed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchV2Metric

func MatchV2Metric(target MetricAndValue) types.GomegaMatcher

func MatchV2MetricAndValue

func MatchV2MetricAndValue(target MetricAndValue) types.GomegaMatcher

func TestMetricChan

func TestMetricChan(receiversChan chan loggregator_v2.Ingress_BatchSenderServer) (chan *loggregator_v2.Envelope, chan struct{})

Types

type FakeIngressClient

type FakeIngressClient struct {
	IncrementCounterStub func(string) error

	IncrementCounterWithDeltaStub func(string, uint64) error

	SendAppErrorLogStub func(string, string, map[string]string) error

	SendAppLogStub func(string, string, map[string]string) error

	SendAppLogRateStub func(float64, float64, map[string]string) error

	SendAppMetricsStub func(diego_logging_client.ContainerMetric) error

	SendBytesPerSecondStub func(string, float64) error

	SendComponentMetricStub func(string, float64, string) error

	SendDurationStub func(string, time.Duration, ...loggregator.EmitGaugeOption) error

	SendMebiBytesStub func(string, int, ...loggregator.EmitGaugeOption) error

	SendMetricStub func(string, int, ...loggregator.EmitGaugeOption) error

	SendRequestsPerSecondStub func(string, float64) error

	SendSpikeMetricsStub func(diego_logging_client.SpikeMetric) error
	// contains filtered or unexported fields
}

func (*FakeIngressClient) IncrementCounter

func (fake *FakeIngressClient) IncrementCounter(arg1 string) error

func (*FakeIngressClient) IncrementCounterArgsForCall

func (fake *FakeIngressClient) IncrementCounterArgsForCall(i int) string

func (*FakeIngressClient) IncrementCounterCallCount

func (fake *FakeIngressClient) IncrementCounterCallCount() int

func (*FakeIngressClient) IncrementCounterCalls

func (fake *FakeIngressClient) IncrementCounterCalls(stub func(string) error)

func (*FakeIngressClient) IncrementCounterReturns

func (fake *FakeIngressClient) IncrementCounterReturns(result1 error)

func (*FakeIngressClient) IncrementCounterReturnsOnCall

func (fake *FakeIngressClient) IncrementCounterReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) IncrementCounterWithDelta

func (fake *FakeIngressClient) IncrementCounterWithDelta(arg1 string, arg2 uint64) error

func (*FakeIngressClient) IncrementCounterWithDeltaArgsForCall

func (fake *FakeIngressClient) IncrementCounterWithDeltaArgsForCall(i int) (string, uint64)

func (*FakeIngressClient) IncrementCounterWithDeltaCallCount

func (fake *FakeIngressClient) IncrementCounterWithDeltaCallCount() int

func (*FakeIngressClient) IncrementCounterWithDeltaCalls

func (fake *FakeIngressClient) IncrementCounterWithDeltaCalls(stub func(string, uint64) error)

func (*FakeIngressClient) IncrementCounterWithDeltaReturns

func (fake *FakeIngressClient) IncrementCounterWithDeltaReturns(result1 error)

func (*FakeIngressClient) IncrementCounterWithDeltaReturnsOnCall

func (fake *FakeIngressClient) IncrementCounterWithDeltaReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) Invocations

func (fake *FakeIngressClient) Invocations() map[string][][]interface{}

func (*FakeIngressClient) SendAppErrorLog

func (fake *FakeIngressClient) SendAppErrorLog(arg1 string, arg2 string, arg3 map[string]string) error

func (*FakeIngressClient) SendAppErrorLogArgsForCall

func (fake *FakeIngressClient) SendAppErrorLogArgsForCall(i int) (string, string, map[string]string)

func (*FakeIngressClient) SendAppErrorLogCallCount

func (fake *FakeIngressClient) SendAppErrorLogCallCount() int

func (*FakeIngressClient) SendAppErrorLogCalls

func (fake *FakeIngressClient) SendAppErrorLogCalls(stub func(string, string, map[string]string) error)

func (*FakeIngressClient) SendAppErrorLogReturns

func (fake *FakeIngressClient) SendAppErrorLogReturns(result1 error)

func (*FakeIngressClient) SendAppErrorLogReturnsOnCall

func (fake *FakeIngressClient) SendAppErrorLogReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendAppLog

func (fake *FakeIngressClient) SendAppLog(arg1 string, arg2 string, arg3 map[string]string) error

func (*FakeIngressClient) SendAppLogArgsForCall

func (fake *FakeIngressClient) SendAppLogArgsForCall(i int) (string, string, map[string]string)

func (*FakeIngressClient) SendAppLogCallCount

func (fake *FakeIngressClient) SendAppLogCallCount() int

func (*FakeIngressClient) SendAppLogCalls

func (fake *FakeIngressClient) SendAppLogCalls(stub func(string, string, map[string]string) error)

func (*FakeIngressClient) SendAppLogRate

func (fake *FakeIngressClient) SendAppLogRate(arg1 float64, arg2 float64, arg3 map[string]string) error

func (*FakeIngressClient) SendAppLogRateArgsForCall

func (fake *FakeIngressClient) SendAppLogRateArgsForCall(i int) (float64, float64, map[string]string)

func (*FakeIngressClient) SendAppLogRateCallCount

func (fake *FakeIngressClient) SendAppLogRateCallCount() int

func (*FakeIngressClient) SendAppLogRateCalls

func (fake *FakeIngressClient) SendAppLogRateCalls(stub func(float64, float64, map[string]string) error)

func (*FakeIngressClient) SendAppLogRateReturns

func (fake *FakeIngressClient) SendAppLogRateReturns(result1 error)

func (*FakeIngressClient) SendAppLogRateReturnsOnCall

func (fake *FakeIngressClient) SendAppLogRateReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendAppLogReturns

func (fake *FakeIngressClient) SendAppLogReturns(result1 error)

func (*FakeIngressClient) SendAppLogReturnsOnCall

func (fake *FakeIngressClient) SendAppLogReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendAppMetrics

func (fake *FakeIngressClient) SendAppMetrics(arg1 diego_logging_client.ContainerMetric) error

func (*FakeIngressClient) SendAppMetricsArgsForCall

func (fake *FakeIngressClient) SendAppMetricsArgsForCall(i int) diego_logging_client.ContainerMetric

func (*FakeIngressClient) SendAppMetricsCallCount

func (fake *FakeIngressClient) SendAppMetricsCallCount() int

func (*FakeIngressClient) SendAppMetricsCalls

func (fake *FakeIngressClient) SendAppMetricsCalls(stub func(diego_logging_client.ContainerMetric) error)

func (*FakeIngressClient) SendAppMetricsReturns

func (fake *FakeIngressClient) SendAppMetricsReturns(result1 error)

func (*FakeIngressClient) SendAppMetricsReturnsOnCall

func (fake *FakeIngressClient) SendAppMetricsReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendBytesPerSecond

func (fake *FakeIngressClient) SendBytesPerSecond(arg1 string, arg2 float64) error

func (*FakeIngressClient) SendBytesPerSecondArgsForCall

func (fake *FakeIngressClient) SendBytesPerSecondArgsForCall(i int) (string, float64)

func (*FakeIngressClient) SendBytesPerSecondCallCount

func (fake *FakeIngressClient) SendBytesPerSecondCallCount() int

func (*FakeIngressClient) SendBytesPerSecondCalls

func (fake *FakeIngressClient) SendBytesPerSecondCalls(stub func(string, float64) error)

func (*FakeIngressClient) SendBytesPerSecondReturns

func (fake *FakeIngressClient) SendBytesPerSecondReturns(result1 error)

func (*FakeIngressClient) SendBytesPerSecondReturnsOnCall

func (fake *FakeIngressClient) SendBytesPerSecondReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendComponentMetric

func (fake *FakeIngressClient) SendComponentMetric(arg1 string, arg2 float64, arg3 string) error

func (*FakeIngressClient) SendComponentMetricArgsForCall

func (fake *FakeIngressClient) SendComponentMetricArgsForCall(i int) (string, float64, string)

func (*FakeIngressClient) SendComponentMetricCallCount

func (fake *FakeIngressClient) SendComponentMetricCallCount() int

func (*FakeIngressClient) SendComponentMetricCalls

func (fake *FakeIngressClient) SendComponentMetricCalls(stub func(string, float64, string) error)

func (*FakeIngressClient) SendComponentMetricReturns

func (fake *FakeIngressClient) SendComponentMetricReturns(result1 error)

func (*FakeIngressClient) SendComponentMetricReturnsOnCall

func (fake *FakeIngressClient) SendComponentMetricReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendDuration

func (fake *FakeIngressClient) SendDuration(arg1 string, arg2 time.Duration, arg3 ...loggregator.EmitGaugeOption) error

func (*FakeIngressClient) SendDurationArgsForCall

func (fake *FakeIngressClient) SendDurationArgsForCall(i int) (string, time.Duration, []loggregator.EmitGaugeOption)

func (*FakeIngressClient) SendDurationCallCount

func (fake *FakeIngressClient) SendDurationCallCount() int

func (*FakeIngressClient) SendDurationCalls

func (fake *FakeIngressClient) SendDurationCalls(stub func(string, time.Duration, ...loggregator.EmitGaugeOption) error)

func (*FakeIngressClient) SendDurationReturns

func (fake *FakeIngressClient) SendDurationReturns(result1 error)

func (*FakeIngressClient) SendDurationReturnsOnCall

func (fake *FakeIngressClient) SendDurationReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendMebiBytes

func (fake *FakeIngressClient) SendMebiBytes(arg1 string, arg2 int, arg3 ...loggregator.EmitGaugeOption) error

func (*FakeIngressClient) SendMebiBytesArgsForCall

func (fake *FakeIngressClient) SendMebiBytesArgsForCall(i int) (string, int, []loggregator.EmitGaugeOption)

func (*FakeIngressClient) SendMebiBytesCallCount

func (fake *FakeIngressClient) SendMebiBytesCallCount() int

func (*FakeIngressClient) SendMebiBytesCalls

func (fake *FakeIngressClient) SendMebiBytesCalls(stub func(string, int, ...loggregator.EmitGaugeOption) error)

func (*FakeIngressClient) SendMebiBytesReturns

func (fake *FakeIngressClient) SendMebiBytesReturns(result1 error)

func (*FakeIngressClient) SendMebiBytesReturnsOnCall

func (fake *FakeIngressClient) SendMebiBytesReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendMetric

func (fake *FakeIngressClient) SendMetric(arg1 string, arg2 int, arg3 ...loggregator.EmitGaugeOption) error

func (*FakeIngressClient) SendMetricArgsForCall

func (fake *FakeIngressClient) SendMetricArgsForCall(i int) (string, int, []loggregator.EmitGaugeOption)

func (*FakeIngressClient) SendMetricCallCount

func (fake *FakeIngressClient) SendMetricCallCount() int

func (*FakeIngressClient) SendMetricCalls

func (fake *FakeIngressClient) SendMetricCalls(stub func(string, int, ...loggregator.EmitGaugeOption) error)

func (*FakeIngressClient) SendMetricReturns

func (fake *FakeIngressClient) SendMetricReturns(result1 error)

func (*FakeIngressClient) SendMetricReturnsOnCall

func (fake *FakeIngressClient) SendMetricReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendRequestsPerSecond

func (fake *FakeIngressClient) SendRequestsPerSecond(arg1 string, arg2 float64) error

func (*FakeIngressClient) SendRequestsPerSecondArgsForCall

func (fake *FakeIngressClient) SendRequestsPerSecondArgsForCall(i int) (string, float64)

func (*FakeIngressClient) SendRequestsPerSecondCallCount

func (fake *FakeIngressClient) SendRequestsPerSecondCallCount() int

func (*FakeIngressClient) SendRequestsPerSecondCalls

func (fake *FakeIngressClient) SendRequestsPerSecondCalls(stub func(string, float64) error)

func (*FakeIngressClient) SendRequestsPerSecondReturns

func (fake *FakeIngressClient) SendRequestsPerSecondReturns(result1 error)

func (*FakeIngressClient) SendRequestsPerSecondReturnsOnCall

func (fake *FakeIngressClient) SendRequestsPerSecondReturnsOnCall(i int, result1 error)

func (*FakeIngressClient) SendSpikeMetrics

func (fake *FakeIngressClient) SendSpikeMetrics(arg1 diego_logging_client.SpikeMetric) error

func (*FakeIngressClient) SendSpikeMetricsArgsForCall

func (fake *FakeIngressClient) SendSpikeMetricsArgsForCall(i int) diego_logging_client.SpikeMetric

func (*FakeIngressClient) SendSpikeMetricsCallCount

func (fake *FakeIngressClient) SendSpikeMetricsCallCount() int

func (*FakeIngressClient) SendSpikeMetricsCalls

func (fake *FakeIngressClient) SendSpikeMetricsCalls(stub func(diego_logging_client.SpikeMetric) error)

func (*FakeIngressClient) SendSpikeMetricsReturns

func (fake *FakeIngressClient) SendSpikeMetricsReturns(result1 error)

func (*FakeIngressClient) SendSpikeMetricsReturnsOnCall

func (fake *FakeIngressClient) SendSpikeMetricsReturnsOnCall(i int, result1 error)

type FakeIngressServer

type FakeIngressServer struct {
	loggregator_v2.UnimplementedIngressServer
	BatchSenderStub func(loggregator_v2.Ingress_BatchSenderServer) error

	SendStub func(context.Context, *loggregator_v2.EnvelopeBatch) (*loggregator_v2.SendResponse, error)

	SenderStub func(loggregator_v2.Ingress_SenderServer) error
	// contains filtered or unexported fields
}

func (*FakeIngressServer) BatchSender

func (*FakeIngressServer) BatchSenderArgsForCall

func (fake *FakeIngressServer) BatchSenderArgsForCall(i int) loggregator_v2.Ingress_BatchSenderServer

func (*FakeIngressServer) BatchSenderCallCount

func (fake *FakeIngressServer) BatchSenderCallCount() int

func (*FakeIngressServer) BatchSenderCalls

func (fake *FakeIngressServer) BatchSenderCalls(stub func(loggregator_v2.Ingress_BatchSenderServer) error)

func (*FakeIngressServer) BatchSenderReturns

func (fake *FakeIngressServer) BatchSenderReturns(result1 error)

func (*FakeIngressServer) BatchSenderReturnsOnCall

func (fake *FakeIngressServer) BatchSenderReturnsOnCall(i int, result1 error)

func (*FakeIngressServer) Invocations

func (fake *FakeIngressServer) Invocations() map[string][][]interface{}

func (*FakeIngressServer) MustEmbedUnimplementedIngressServerCallCount

func (fake *FakeIngressServer) MustEmbedUnimplementedIngressServerCallCount() int

func (*FakeIngressServer) MustEmbedUnimplementedIngressServerCalls

func (fake *FakeIngressServer) MustEmbedUnimplementedIngressServerCalls(stub func())

func (*FakeIngressServer) Send

func (*FakeIngressServer) SendArgsForCall

func (fake *FakeIngressServer) SendArgsForCall(i int) (context.Context, *loggregator_v2.EnvelopeBatch)

func (*FakeIngressServer) SendCallCount

func (fake *FakeIngressServer) SendCallCount() int

func (*FakeIngressServer) SendCalls

func (*FakeIngressServer) SendReturns

func (fake *FakeIngressServer) SendReturns(result1 *loggregator_v2.SendResponse, result2 error)

func (*FakeIngressServer) SendReturnsOnCall

func (fake *FakeIngressServer) SendReturnsOnCall(i int, result1 *loggregator_v2.SendResponse, result2 error)

func (*FakeIngressServer) Sender

func (*FakeIngressServer) SenderArgsForCall

func (fake *FakeIngressServer) SenderArgsForCall(i int) loggregator_v2.Ingress_SenderServer

func (*FakeIngressServer) SenderCallCount

func (fake *FakeIngressServer) SenderCallCount() int

func (*FakeIngressServer) SenderCalls

func (fake *FakeIngressServer) SenderCalls(stub func(loggregator_v2.Ingress_SenderServer) error)

func (*FakeIngressServer) SenderReturns

func (fake *FakeIngressServer) SenderReturns(result1 error)

func (*FakeIngressServer) SenderReturnsOnCall

func (fake *FakeIngressServer) SenderReturnsOnCall(i int, result1 error)

type FakeIngress_SenderServer

type FakeIngress_SenderServer struct {
	SendAndCloseStub func(*loggregator_v2.IngressResponse) error

	RecvStub func() (*loggregator_v2.Envelope, error)

	SetHeaderStub func(metadata.MD) error

	SendHeaderStub func(metadata.MD) error

	SetTrailerStub func(metadata.MD)

	ContextStub func() context.Context

	SendMsgStub func(m interface{}) error

	RecvMsgStub func(m interface{}) error
	// contains filtered or unexported fields
}

func (*FakeIngress_SenderServer) Context

func (fake *FakeIngress_SenderServer) Context() context.Context

func (*FakeIngress_SenderServer) ContextCallCount

func (fake *FakeIngress_SenderServer) ContextCallCount() int

func (*FakeIngress_SenderServer) ContextReturns

func (fake *FakeIngress_SenderServer) ContextReturns(result1 context.Context)

func (*FakeIngress_SenderServer) ContextReturnsOnCall

func (fake *FakeIngress_SenderServer) ContextReturnsOnCall(i int, result1 context.Context)

func (*FakeIngress_SenderServer) Invocations

func (fake *FakeIngress_SenderServer) Invocations() map[string][][]interface{}

func (*FakeIngress_SenderServer) Recv

func (*FakeIngress_SenderServer) RecvCallCount

func (fake *FakeIngress_SenderServer) RecvCallCount() int

func (*FakeIngress_SenderServer) RecvMsg

func (fake *FakeIngress_SenderServer) RecvMsg(m interface{}) error

func (*FakeIngress_SenderServer) RecvMsgArgsForCall

func (fake *FakeIngress_SenderServer) RecvMsgArgsForCall(i int) interface{}

func (*FakeIngress_SenderServer) RecvMsgCallCount

func (fake *FakeIngress_SenderServer) RecvMsgCallCount() int

func (*FakeIngress_SenderServer) RecvMsgReturns

func (fake *FakeIngress_SenderServer) RecvMsgReturns(result1 error)

func (*FakeIngress_SenderServer) RecvMsgReturnsOnCall

func (fake *FakeIngress_SenderServer) RecvMsgReturnsOnCall(i int, result1 error)

func (*FakeIngress_SenderServer) RecvReturns

func (fake *FakeIngress_SenderServer) RecvReturns(result1 *loggregator_v2.Envelope, result2 error)

func (*FakeIngress_SenderServer) RecvReturnsOnCall

func (fake *FakeIngress_SenderServer) RecvReturnsOnCall(i int, result1 *loggregator_v2.Envelope, result2 error)

func (*FakeIngress_SenderServer) SendAndClose

func (*FakeIngress_SenderServer) SendAndCloseArgsForCall

func (fake *FakeIngress_SenderServer) SendAndCloseArgsForCall(i int) *loggregator_v2.IngressResponse

func (*FakeIngress_SenderServer) SendAndCloseCallCount

func (fake *FakeIngress_SenderServer) SendAndCloseCallCount() int

func (*FakeIngress_SenderServer) SendAndCloseReturns

func (fake *FakeIngress_SenderServer) SendAndCloseReturns(result1 error)

func (*FakeIngress_SenderServer) SendAndCloseReturnsOnCall

func (fake *FakeIngress_SenderServer) SendAndCloseReturnsOnCall(i int, result1 error)

func (*FakeIngress_SenderServer) SendHeader

func (fake *FakeIngress_SenderServer) SendHeader(arg1 metadata.MD) error

func (*FakeIngress_SenderServer) SendHeaderArgsForCall

func (fake *FakeIngress_SenderServer) SendHeaderArgsForCall(i int) metadata.MD

func (*FakeIngress_SenderServer) SendHeaderCallCount

func (fake *FakeIngress_SenderServer) SendHeaderCallCount() int

func (*FakeIngress_SenderServer) SendHeaderReturns

func (fake *FakeIngress_SenderServer) SendHeaderReturns(result1 error)

func (*FakeIngress_SenderServer) SendHeaderReturnsOnCall

func (fake *FakeIngress_SenderServer) SendHeaderReturnsOnCall(i int, result1 error)

func (*FakeIngress_SenderServer) SendMsg

func (fake *FakeIngress_SenderServer) SendMsg(m interface{}) error

func (*FakeIngress_SenderServer) SendMsgArgsForCall

func (fake *FakeIngress_SenderServer) SendMsgArgsForCall(i int) interface{}

func (*FakeIngress_SenderServer) SendMsgCallCount

func (fake *FakeIngress_SenderServer) SendMsgCallCount() int

func (*FakeIngress_SenderServer) SendMsgReturns

func (fake *FakeIngress_SenderServer) SendMsgReturns(result1 error)

func (*FakeIngress_SenderServer) SendMsgReturnsOnCall

func (fake *FakeIngress_SenderServer) SendMsgReturnsOnCall(i int, result1 error)

func (*FakeIngress_SenderServer) SetHeader

func (fake *FakeIngress_SenderServer) SetHeader(arg1 metadata.MD) error

func (*FakeIngress_SenderServer) SetHeaderArgsForCall

func (fake *FakeIngress_SenderServer) SetHeaderArgsForCall(i int) metadata.MD

func (*FakeIngress_SenderServer) SetHeaderCallCount

func (fake *FakeIngress_SenderServer) SetHeaderCallCount() int

func (*FakeIngress_SenderServer) SetHeaderReturns

func (fake *FakeIngress_SenderServer) SetHeaderReturns(result1 error)

func (*FakeIngress_SenderServer) SetHeaderReturnsOnCall

func (fake *FakeIngress_SenderServer) SetHeaderReturnsOnCall(i int, result1 error)

func (*FakeIngress_SenderServer) SetTrailer

func (fake *FakeIngress_SenderServer) SetTrailer(arg1 metadata.MD)

func (*FakeIngress_SenderServer) SetTrailerArgsForCall

func (fake *FakeIngress_SenderServer) SetTrailerArgsForCall(i int) metadata.MD

func (*FakeIngress_SenderServer) SetTrailerCallCount

func (fake *FakeIngress_SenderServer) SetTrailerCallCount() int

type MetricAndValue

type MetricAndValue struct {
	Name  string
	Value int32
}

type TestIngressServer

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

func NewTestIngressServer

func NewTestIngressServer(serverCert, serverKey, caCert string) (*TestIngressServer, error)

func (*TestIngressServer) Addr

func (t *TestIngressServer) Addr() string

func (*TestIngressServer) Port

func (t *TestIngressServer) Port() (int, error)

func (*TestIngressServer) Receivers

func (*TestIngressServer) Start

func (t *TestIngressServer) Start() error

func (*TestIngressServer) Stop

func (t *TestIngressServer) Stop()

Jump to

Keyboard shortcuts

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