Documentation ¶
Overview ¶
Package grpsink is a generated protocol buffer package.
It is generated from these files:
sinks/grpsink/grpc_sink.proto
It has these top-level messages:
SpanResponse
Index ¶
- Variables
- func RegisterSpanSinkServer(s *grpc.Server, srv SpanSinkServer)
- type GRPCStreamingSpanSink
- type SpanResponse
- func (*SpanResponse) Descriptor() ([]byte, []int)
- func (m *SpanResponse) GetGreeting() string
- func (m *SpanResponse) Marshal() (dAtA []byte, err error)
- func (m *SpanResponse) MarshalTo(dAtA []byte) (int, error)
- func (*SpanResponse) ProtoMessage()
- func (m *SpanResponse) Reset()
- func (m *SpanResponse) Size() (n int)
- func (m *SpanResponse) String() string
- func (m *SpanResponse) Unmarshal(dAtA []byte) error
- type SpanSinkClient
- type SpanSinkServer
- type SpanSink_SendSpansClient
- type SpanSink_SendSpansServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthGrpcSink = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGrpcSink = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterSpanSinkServer ¶
func RegisterSpanSinkServer(s *grpc.Server, srv SpanSinkServer)
Types ¶
type GRPCStreamingSpanSink ¶
type GRPCStreamingSpanSink struct {
// contains filtered or unexported fields
}
GRPCStreamingSpanSink is a sink that streams spans to a configurable target service over gRPC. The sink is only tied to the grpc_sink.proto definition of a SpanSink service, and thus is generic with respect to the specific server it is connecting to.
func NewGRPCStreamingSpanSink ¶
func NewGRPCStreamingSpanSink(ctx context.Context, target, name string, commonTags map[string]string, log *logrus.Logger, opts ...grpc.DialOption) (*GRPCStreamingSpanSink, error)
NewGRPCStreamingSpanSink creates a sinks.SpanSink that can write to any compliant gRPC server.
The target parameter should be of the "host:port"; the name parameter is prepended with "grpc-", and is used when reporting logs in order to permit differentiation between various services.
Any grpc.CallOpts that are provided will be used while first establishing the connection to the target server (in grpc.DialContext()).
func (*GRPCStreamingSpanSink) Flush ¶
func (gs *GRPCStreamingSpanSink) Flush()
Flush reports total counts of the number of sent and dropped spans over its lifetime.
No data is sent to the target sink on Flush(), as this sink operates entirely over a stream on Ingest().
func (*GRPCStreamingSpanSink) Ingest ¶
func (gs *GRPCStreamingSpanSink) Ingest(ssfSpan *ssf.SSFSpan) error
Ingest takes in a span and streams it over gRPC to the connected server.
func (*GRPCStreamingSpanSink) Name ¶
func (gs *GRPCStreamingSpanSink) Name() string
Name returns this sink's name. As the gRPC sink is generic, it's expected that this is set via configuration and injected.
type SpanResponse ¶
type SpanResponse struct {
Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"`
}
func (*SpanResponse) Descriptor ¶
func (*SpanResponse) Descriptor() ([]byte, []int)
func (*SpanResponse) GetGreeting ¶
func (m *SpanResponse) GetGreeting() string
func (*SpanResponse) Marshal ¶
func (m *SpanResponse) Marshal() (dAtA []byte, err error)
func (*SpanResponse) ProtoMessage ¶
func (*SpanResponse) ProtoMessage()
func (*SpanResponse) Reset ¶
func (m *SpanResponse) Reset()
func (*SpanResponse) Size ¶
func (m *SpanResponse) Size() (n int)
func (*SpanResponse) String ¶
func (m *SpanResponse) String() string
func (*SpanResponse) Unmarshal ¶
func (m *SpanResponse) Unmarshal(dAtA []byte) error
type SpanSinkClient ¶
type SpanSinkClient interface {
SendSpans(ctx context.Context, opts ...grpc.CallOption) (SpanSink_SendSpansClient, error)
}
func NewSpanSinkClient ¶
func NewSpanSinkClient(cc *grpc.ClientConn) SpanSinkClient
type SpanSinkServer ¶
type SpanSinkServer interface {
SendSpans(SpanSink_SendSpansServer) error
}
type SpanSink_SendSpansClient ¶
type SpanSink_SendSpansClient interface { Send(*ssf.SSFSpan) error CloseAndRecv() (*SpanResponse, error) grpc.ClientStream }
type SpanSink_SendSpansServer ¶
type SpanSink_SendSpansServer interface { SendAndClose(*SpanResponse) error Recv() (*ssf.SSFSpan, error) grpc.ServerStream }