Documentation ¶
Index ¶
- Variables
- func Create(server *veneur.Server, name string, logger *logrus.Entry, config veneur.Config, ...) (sinks.SpanSink, error)
- func MigrateConfig(conf *veneur.Config)
- func ParseConfig(name string, config interface{}) (veneur.SpanSinkConfig, error)
- func RegisterSpanSinkServer(s *grpc.Server, srv SpanSinkServer)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (m *Empty) Marshal() (dAtA []byte, err error)
- func (m *Empty) MarshalTo(dAtA []byte) (int, error)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) Size() (n int)
- func (m *Empty) String() string
- func (m *Empty) Unmarshal(dAtA []byte) error
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type FalconerSpanSink
- type FalconerSpanSinkConfig
- type SpanSinkClient
- type SpanSinkServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthGrpcSink = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGrpcSink = fmt.Errorf("proto: integer overflow") )
Functions ¶
func Create ¶ added in v14.2.0
func Create( server *veneur.Server, name string, logger *logrus.Entry, config veneur.Config, sinkConfig veneur.SpanSinkConfig, ) (sinks.SpanSink, error)
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 MigrateConfig ¶ added in v14.2.0
func MigrateConfig(conf *veneur.Config)
func ParseConfig ¶ added in v14.2.0
ParseConfig decodes the map config for a Grpc sink into a GrpcSpanSinkConfig struct.
func RegisterSpanSinkServer ¶ added in v14.2.0
func RegisterSpanSinkServer(s *grpc.Server, srv SpanSinkServer)
Types ¶
type Empty ¶ added in v14.2.0
type Empty struct { }
func (*Empty) Descriptor ¶ added in v14.2.0
func (*Empty) ProtoMessage ¶ added in v14.2.0
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶ added in v14.2.0
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶ added in v14.2.0
func (*Empty) XXX_Unmarshal ¶ added in v14.2.0
type FalconerSpanSink ¶ added in v14.2.0
type FalconerSpanSink struct {
// contains filtered or unexported fields
}
FalconerSpanSink 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 (*FalconerSpanSink) Flush ¶ added in v14.2.0
func (gs *FalconerSpanSink) 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 (*FalconerSpanSink) Ingest ¶ added in v14.2.0
func (gs *FalconerSpanSink) Ingest(ssfSpan *ssf.SSFSpan) error
Ingest takes in a span and streams it over gRPC to the connected server.
func (*FalconerSpanSink) Name ¶ added in v14.2.0
func (gs *FalconerSpanSink) 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 FalconerSpanSinkConfig ¶ added in v14.2.0
type FalconerSpanSinkConfig struct {
Target string `yaml:"target"`
}
type SpanSinkClient ¶ added in v14.2.0
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 ¶ added in v14.2.0
func NewSpanSinkClient(cc *grpc.ClientConn) SpanSinkClient