shared

package
v0.0.0-...-be244c0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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

This section is empty.

Types

type ArchiveReader

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

ArchiveReader wraps storage_v1.ArchiveSpanReaderPluginClient into spanstore.Reader

func (*ArchiveReader) FindTraceIDs

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

FindTraceIDs not used in ArchiveReader

func (*ArchiveReader) FindTraces

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

FindTraces not used in ArchiveReader

func (*ArchiveReader) GetOperations

GetOperations not used in ArchiveReader

func (*ArchiveReader) GetServices

func (r *ArchiveReader) GetServices(ctx context.Context) ([]string, error)

GetServices not used in ArchiveReader

func (*ArchiveReader) GetTrace

func (r *ArchiveReader) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)

GetTrace takes a traceID and returns a Trace associated with that traceID from Archive Storage

type ArchiveStoragePlugin

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

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

type ArchiveWriter

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

ArchiveWriter wraps storage_v1.ArchiveSpanWriterPluginClient into spanstore.Writer

func (*ArchiveWriter) WriteSpan

func (w *ArchiveWriter) WriteSpan(ctx context.Context, span *model.Span) error

WriteSpan saves the span into Archive Storage

type Capabilities

type Capabilities struct {
	ArchiveSpanReader bool
	ArchiveSpanWriter bool
}

Capabilities contains information about plugin capabilities

type PluginCapabilities

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

PluginCapabilities allow expose plugin its capabilities.

type StorageGRPCPlugin

type StorageGRPCPlugin struct {
	plugin.Plugin
	// Concrete implementation, written in Go. This is only used for plugins
	// that are written in Go.
	Impl        StoragePlugin
	ArchiveImpl ArchiveStoragePlugin
}

StorageGRPCPlugin is the implementation of plugin.GRPCPlugin so we can serve/consume this.

func (*StorageGRPCPlugin) GRPCClient

func (*StorageGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

GRPCClient is used by go-plugin to create a grpc plugin client

func (*StorageGRPCPlugin) GRPCServer

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

GRPCServer is used by go-plugin to create a grpc plugin 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.

Jump to

Keyboard shortcuts

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