shared

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const BearerTokenKey = "bearer.token"

BearerTokenKey is the key name for the bearer token context value.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities

type Capabilities struct {
	StreamingSpanWriter bool
}

Capabilities contains information about plugin capabilities

type GRPCClient

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

GRPCClient implements shared.StoragePlugin and reads/writes spans and dependencies

func NewGRPCClient

func NewGRPCClient(tracedConn *grpc.ClientConn, untracedConn *grpc.ClientConn) *GRPCClient

func (*GRPCClient) Capabilities

func (c *GRPCClient) Capabilities() (*Capabilities, error)

func (*GRPCClient) Close

func (c *GRPCClient) Close() error

func (*GRPCClient) DependencyReader

func (c *GRPCClient) DependencyReader() dependencystore.Reader

DependencyReader implements shared.StoragePlugin.

func (*GRPCClient) FindTraceIDs

func (c *GRPCClient) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error)

FindTraceIDs retrieves traceIDs that match the traceQuery

func (*GRPCClient) FindTraces

func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error)

FindTraces retrieves traces that match the traceQuery

func (*GRPCClient) GetDependencies

func (c *GRPCClient) GetDependencies(ctx context.Context, endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error)

GetDependencies returns all interservice dependencies

func (*GRPCClient) GetOperations

GetOperations returns the operations of a given service

func (*GRPCClient) GetServices

func (c *GRPCClient) GetServices(ctx context.Context) ([]string, error)

GetServices returns a list of all known services

func (*GRPCClient) GetTrace

func (c *GRPCClient) GetTrace(ctx context.Context, query spanstore.GetTraceParameters) (*model.Trace, error)

GetTrace takes a traceID and returns a Trace associated with that traceID

func (*GRPCClient) SpanReader

func (c *GRPCClient) SpanReader() spanstore.Reader

SpanReader implements shared.StoragePlugin.

func (*GRPCClient) SpanWriter

func (c *GRPCClient) SpanWriter() spanstore.Writer

SpanWriter implements shared.StoragePlugin.

func (*GRPCClient) StreamingSpanWriter

func (c *GRPCClient) StreamingSpanWriter() spanstore.Writer

func (*GRPCClient) WriteSpan

func (c *GRPCClient) WriteSpan(ctx context.Context, span *model.Span) error

WriteSpan saves the span

type GRPCHandler

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

GRPCHandler implements all methods of Remote Storage gRPC API.

func NewGRPCHandler

func NewGRPCHandler(impl *GRPCHandlerStorageImpl) *GRPCHandler

NewGRPCHandler creates a handler given individual storage implementations.

func (*GRPCHandler) FindTraceIDs

FindTraceIDs retrieves traceIDs that match the traceQuery

func (*GRPCHandler) FindTraces

FindTraces streams traces that match the traceQuery

func (*GRPCHandler) GetDependencies

GetDependencies returns all interservice dependencies

func (*GRPCHandler) GetOperations

GetOperations returns the operations of a given service

func (*GRPCHandler) GetServices

GetServices returns a list of all known services

func (*GRPCHandler) GetTrace

GetTrace takes a traceID and streams a Trace associated with that traceID

func (*GRPCHandler) Register

func (s *GRPCHandler) Register(ss *grpc.Server, hs *health.Server) error

Register registers the server as gRPC methods handler.

func (*GRPCHandler) WriteSpan

WriteSpan saves the span

func (*GRPCHandler) WriteSpanStream

WriteSpanStream receive the span from stream and save it

type GRPCHandlerStorageImpl

type GRPCHandlerStorageImpl struct {
	SpanReader       func() spanstore.Reader
	SpanWriter       func() spanstore.Writer
	DependencyReader func() dependencystore.Reader

	StreamingSpanWriter func() spanstore.Writer
}

GRPCHandlerStorageImpl contains accessors for various storage implementations needed by the handler.

type PluginCapabilities

type PluginCapabilities interface {
	Capabilities() (*Capabilities, error)
}

PluginCapabilities allow expose plugin its capabilities.

type PluginServices

type PluginServices struct {
	Store               StoragePlugin
	StreamingSpanWriter StreamingSpanWriterPlugin
}

PluginServices defines services plugin can expose

type StoragePlugin

type StoragePlugin interface {
	SpanReader() spanstore.Reader
	SpanWriter() spanstore.Writer
	DependencyReader() dependencystore.Reader
}

StoragePlugin is the interface we're exposing as a plugin.

type StreamingSpanWriterPlugin

type StreamingSpanWriterPlugin interface {
	StreamingSpanWriter() spanstore.Writer
}

StreamingSpanWriterPlugin is the interface we're exposing as a plugin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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