shared

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 43

Documentation

Index

Constants

View Source
const BearerTokenKey = "bearer.token"

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

View Source
const StoragePluginIdentifier = "storage_plugin"

StoragePluginIdentifier is the identifier that is shared by plugin and host.

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	MagicCookieKey:   "STORAGE_PLUGIN",
	MagicCookieValue: "jaeger",
}

Handshake is a common handshake that is shared by plugin and host.

View Source
var PluginMap = map[string]plugin.Plugin{
	StoragePluginIdentifier: &StorageGRPCPlugin{},
}

PluginMap is the map of plugins we can dispense.

Functions

func NewGRPCClient added in v1.30.0

func NewGRPCClient(c *grpc.ClientConn) *grpcClient

Types

type ArchiveStoragePlugin added in v1.20.0

type ArchiveStoragePlugin interface {
	ArchiveSpanReader() spanstore.Reader
	ArchiveSpanWriter() spanstore.Writer
}

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

type Capabilities added in v1.20.0

type Capabilities struct {
	ArchiveSpanReader   bool
	ArchiveSpanWriter   bool
	StreamingSpanWriter bool
}

Capabilities contains information about plugin capabilities

type ContextUpgradeFunc added in v1.23.0

type ContextUpgradeFunc func(ctx context.Context) context.Context

ContextUpgradeFunc is a functional type that can be composed to upgrade context

type GRPCHandler added in v1.37.0

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

GRPCHandler implements all methods of Remote Storage gRPC API.

func NewGRPCHandler added in v1.37.0

func NewGRPCHandler(impl *GRPCHandlerStorageImpl) *GRPCHandler

NewGRPCHandler creates a handler given individual storage implementations.

func NewGRPCHandlerWithPlugins added in v1.37.0

func NewGRPCHandlerWithPlugins(
	mainImpl StoragePlugin,
	archiveImpl ArchiveStoragePlugin,
	streamImpl StreamingSpanWriterPlugin,
) *GRPCHandler

NewGRPCHandler creates a handler given implementations grouped by plugin services.

func (*GRPCHandler) Capabilities added in v1.37.0

func (*GRPCHandler) Close added in v1.37.0

func (*GRPCHandler) FindTraceIDs added in v1.37.0

FindTraceIDs retrieves traceIDs that match the traceQuery

func (*GRPCHandler) FindTraces added in v1.37.0

FindTraces streams traces that match the traceQuery

func (*GRPCHandler) GetArchiveTrace added in v1.37.0

func (*GRPCHandler) GetDependencies added in v1.37.0

GetDependencies returns all interservice dependencies

func (*GRPCHandler) GetOperations added in v1.37.0

GetOperations returns the operations of a given service

func (*GRPCHandler) GetServices added in v1.37.0

GetServices returns a list of all known services

func (*GRPCHandler) GetTrace added in v1.37.0

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

func (*GRPCHandler) Register added in v1.37.0

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

Register registers the server as gRPC methods handler.

func (*GRPCHandler) WriteArchiveSpan added in v1.37.0

func (*GRPCHandler) WriteSpan added in v1.37.0

WriteSpan saves the span

func (*GRPCHandler) WriteSpanStream added in v1.37.0

WriteSpanStream receive the span from stream and save it

type GRPCHandlerStorageImpl added in v1.37.0

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

	ArchiveSpanReader func() spanstore.Reader
	ArchiveSpanWriter func() spanstore.Writer

	StreamingSpanWriter func() spanstore.Writer
}

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

type PluginCapabilities added in v1.20.0

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

PluginCapabilities allow expose plugin its capabilities.

type PluginServices added in v1.20.0

type PluginServices struct {
	Store               StoragePlugin
	ArchiveStore        ArchiveStoragePlugin
	StreamingSpanWriter StreamingSpanWriterPlugin
}

PluginServices defines services plugin can expose

type StorageGRPCPlugin

type StorageGRPCPlugin struct {
	plugin.Plugin

	// Concrete implementation, This is only used for plugins that are written in Go.
	Impl        StoragePlugin
	ArchiveImpl ArchiveStoragePlugin
	StreamImpl  StreamingSpanWriterPlugin
}

StorageGRPCPlugin is the implementation of plugin.GRPCPlugin.

func (*StorageGRPCPlugin) GRPCClient

func (*StorageGRPCPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, conn *grpc.ClientConn) (interface{}, error)

GRPCClient implements plugin.GRPCPlugin. It is used by go-plugin to create a grpc plugin client.

func (*StorageGRPCPlugin) GRPCServer

func (p *StorageGRPCPlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error

GRPCServer implements plugin.GRPCPlugin. It is used by go-plugin to create a grpc plugin server.

func (*StorageGRPCPlugin) RegisterHandlers added in v1.30.0

func (p *StorageGRPCPlugin) RegisterHandlers(s *grpc.Server) error

RegisterHandlers registers the plugin with the server

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 added in v1.34.0

type StreamingSpanWriterPlugin interface {
	StreamingSpanWriter() spanstore.Writer
}

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

Jump to

Keyboard shortcuts

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