Documentation ¶
Index ¶
Constants ¶
View Source
const TestWrongReceiveData = "the sent data is not equal to the received data\n, " +
"want data %s\n, but got %s\n"
Variables ¶
This section is empty.
Functions ¶
func TestReceiver ¶ added in v0.2.0
func TestReceiver(rec receiver.Receiver, dataGenerator func(t *testing.T, sequence int, conn *grpc.ClientConn, ctx context.Context) string, snifferConvertor func(data *v1.SniffData) string, t *testing.T, )
TestReceiver help to testing grpc receiver
func TestReceiverWithConfig ¶ added in v0.3.0
func TestReceiverWithConfig(rec receiver.Receiver, recConf map[string]string, dataGenerator func(t *testing.T, sequence int, conn *grpc.ClientConn, ctx context.Context) string, snifferConvertor func(data *v1.SniffData) string, t *testing.T, )
TestReceiverWithConfig help to testing grpc receiver with customize config
func TestReceiverWithSync ¶ added in v0.2.0
func TestReceiverWithSync(rec receiver.Receiver, dataGenerator func(t *testing.T, sequence int, conn *grpc.ClientConn, sendData *string, ctx context.Context), snifferConvertor func(data *v1.SniffData) string, mockResp *v1.SniffData, t *testing.T, )
TestReceiverWithSync help to testing grpc receiver
Types ¶
type CommonGRPCReceiverFields ¶
type CommonGRPCReceiverFields struct { Server *grpc.Server OutputChannel chan *v1.SniffData // The channel is to bridge the LogReportService and the Gatherer to delivery the data. }
func InitCommonGRPCReceiverFields ¶
func InitCommonGRPCReceiverFields(server interface{}) *CommonGRPCReceiverFields
InitCommonGRPCReceiverFields init the common fields for gRPC receivers.
Click to show internal directories.
Click to hide internal directories.