veneur: github.com/stripe/veneur/sinks/grpsink Index | Files

package grpsink

import "github.com/stripe/veneur/sinks/grpsink"

Index

Package Files

convert_context_19.go grpc_sink.pb.go grpsink.go state_helper_test19.go

Variables

var (
    ErrInvalidLengthGrpcSink = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowGrpcSink   = fmt.Errorf("proto: integer overflow")
)

func RegisterSpanSinkServer Uses

func RegisterSpanSinkServer(s *grpc.Server, srv SpanSinkServer)

type Empty Uses

type Empty struct {
}

func (*Empty) Descriptor Uses

func (*Empty) Descriptor() ([]byte, []int)

func (*Empty) Marshal Uses

func (m *Empty) Marshal() (dAtA []byte, err error)

func (*Empty) MarshalTo Uses

func (m *Empty) MarshalTo(dAtA []byte) (int, error)

func (*Empty) ProtoMessage Uses

func (*Empty) ProtoMessage()

func (*Empty) Reset Uses

func (m *Empty) Reset()

func (*Empty) Size Uses

func (m *Empty) Size() (n int)

func (*Empty) String Uses

func (m *Empty) String() string

func (*Empty) Unmarshal Uses

func (m *Empty) Unmarshal(dAtA []byte) error

func (*Empty) XXX_DiscardUnknown Uses

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal Uses

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge Uses

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size Uses

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal Uses

func (m *Empty) XXX_Unmarshal(b []byte) error

type GRPCSpanSink Uses

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

GRPCSpanSink is a generic sink that sends 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 agnostic with respect to the specific server it is connecting to.

func NewGRPCSpanSink Uses

func NewGRPCSpanSink(ctx context.Context, target, name string, log *logrus.Logger, opts ...grpc.DialOption) (*GRPCSpanSink, error)

NewGRPCSpanSink 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 (*GRPCSpanSink) Flush Uses

func (gs *GRPCSpanSink) Flush()

Flush reports total counts of the number of sent and dropped spans since the last flush.

No data is sent to the target sink by this call, as this sink dispatches all spans directly via gRPC during Ingest().

func (*GRPCSpanSink) Ingest Uses

func (gs *GRPCSpanSink) Ingest(ssfSpan *ssf.SSFSpan) error

Ingest takes in a span and streams it over gRPC to the connected server.

func (*GRPCSpanSink) Name Uses

func (gs *GRPCSpanSink) 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.

func (*GRPCSpanSink) Start Uses

func (gs *GRPCSpanSink) Start(cl *trace.Client) error

Start performs final preparations on the sink before it is ready to begin ingesting spans.

type SpanSinkClient Uses

type SpanSinkClient interface {
    SendSpan(ctx context.Context, in *ssf.SSFSpan, opts ...grpc.CallOption) (*Empty, error)
}

SpanSinkClient is the client API for SpanSink service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSpanSinkClient Uses

func NewSpanSinkClient(cc *grpc.ClientConn) SpanSinkClient

type SpanSinkServer Uses

type SpanSinkServer interface {
    SendSpan(context.Context, *ssf.SSFSpan) (*Empty, error)
}

SpanSinkServer is the server API for SpanSink service.

Package grpsink imports 21 packages (graph) and is imported by 2 packages. Updated 2020-02-06. Refresh now. Tools for package owners.