comedy

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 20 Imported by: 6

Documentation

Index

Constants

View Source
const (
	TRACE        string = "trace"
	SPAN         string = "span"
	TRACESTART   string = "trace_start"
	TRACECLOSE   string = "trace_close"
	DATABASESPAN string = "database_span"
	ITEMS        string = "items"
)
View Source
const (
	DefaultAddress string = "localhost:50052"
)

Variables

This section is empty.

Functions

func CreateCombinedId added in v0.5.0

func CreateCombinedId(trace *pb.TraceBare) string

func GenerateSpanID added in v0.5.0

func GenerateSpanID() string

func TraceFromCtx added in v0.5.0

func TraceFromCtx(ctx context.Context) *pb.TraceBare

Types

type Adapter added in v0.5.0

type Adapter func(http.HandlerFunc) http.HandlerFunc

func Trace added in v0.5.0

func Trace(tracer pb.TraceService_ChorusClient) Adapter

func TraceWithLogAndSpan added in v0.5.7

func TraceWithLogAndSpan(tracer pb.TraceService_ChorusClient) Adapter

type ClientTracer

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

func NewClientTracer

func NewClientTracer(serviceAddress string) (*ClientTracer, error)

func (*ClientTracer) Chorus added in v0.5.0

func (*ClientTracer) HealthCheck

func (c *ClientTracer) HealthCheck(ctx context.Context, request *pb.Empty) (*pb.HealthCheckResponse, error)

func (*ClientTracer) WaitForHealthyState

func (c *ClientTracer) WaitForHealthyState() bool

type MapCommand added in v0.5.0

type MapCommand struct {
	Action   string
	TraceID  string
	Time     time.Time
	Response chan<- MapResponse
}

type MapResponse added in v0.5.0

type MapResponse struct {
	Time  time.Time
	Found bool
}

type TraceService

type TraceService interface {
	HealthCheck(ctx context.Context, start *pb.Empty) (*pb.HealthCheckResponse, error)
	Chorus(ctx context.Context) (pb.TraceService_ChorusClient, error)
	WaitForHealthyState() bool
}

type TraceServiceClient

type TraceServiceClient struct {
	Impl TraceService
}

type TraceServiceImpl

type TraceServiceImpl struct {
	PodName       string
	Namespace     string
	Index         string
	Elastic       aristoteles.Client
	Metrics       *sophokles.ClientMetrics
	GatherMetrics bool

	pb.UnimplementedTraceServiceServer
	// contains filtered or unexported fields
}

func NewTraceServiceImpl

func NewTraceServiceImpl() (*TraceServiceImpl, error)

func (*TraceServiceImpl) Chorus added in v0.5.0

func (*TraceServiceImpl) CloseTrace

func (t *TraceServiceImpl) CloseTrace(close *pb.ParabasisRequest_CloseTrace, traceID, ParentSpanID string)

func (*TraceServiceImpl) DatabaseSpan

func (t *TraceServiceImpl) DatabaseSpan(in *pb.ParabasisRequest_DatabaseSpan, traceID, ParentSpanID string)

func (*TraceServiceImpl) HealthCheck

func (t *TraceServiceImpl) HealthCheck(ctx context.Context, start *pb.Empty) (*pb.HealthCheckResponse, error)

func (*TraceServiceImpl) ManageStartTimeMap added in v0.5.0

func (t *TraceServiceImpl) ManageStartTimeMap()

func (*TraceServiceImpl) Span

func (t *TraceServiceImpl) Span(in *pb.ParabasisRequest_Span, traceID, ParentSpanID string)

func (*TraceServiceImpl) StartTrace

func (t *TraceServiceImpl) StartTrace(start *pb.ParabasisRequest_StartTrace, traceID, ParentSpanID string)

func (*TraceServiceImpl) Trace

func (t *TraceServiceImpl) Trace(in *pb.ParabasisRequest_Trace, traceID, ParentSpanID, spanID string)

func (*TraceServiceImpl) UpdateDocumentWithRetry

func (t *TraceServiceImpl) UpdateDocumentWithRetry(traceID, itemName string, data []byte) (string, error)

Jump to

Keyboard shortcuts

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