Documentation ¶
Index ¶
- Constants
- Variables
- func NewGRPCClient(c *grpc.ClientConn) *grpcClient
- type ArchiveStoragePlugin
- type Capabilities
- type ContextUpgradeFunc
- type GRPCHandler
- func (s *GRPCHandler) Capabilities(ctx context.Context, request *storage_v1.CapabilitiesRequest) (*storage_v1.CapabilitiesResponse, error)
- func (s *GRPCHandler) Close(ctx context.Context, r *storage_v1.CloseWriterRequest) (*storage_v1.CloseWriterResponse, error)
- func (s *GRPCHandler) FindTraceIDs(ctx context.Context, r *storage_v1.FindTraceIDsRequest) (*storage_v1.FindTraceIDsResponse, error)
- func (s *GRPCHandler) FindTraces(r *storage_v1.FindTracesRequest, ...) error
- func (s *GRPCHandler) GetArchiveTrace(r *storage_v1.GetTraceRequest, ...) error
- func (s *GRPCHandler) GetDependencies(ctx context.Context, r *storage_v1.GetDependenciesRequest) (*storage_v1.GetDependenciesResponse, error)
- func (s *GRPCHandler) GetOperations(ctx context.Context, r *storage_v1.GetOperationsRequest) (*storage_v1.GetOperationsResponse, error)
- func (s *GRPCHandler) GetServices(ctx context.Context, r *storage_v1.GetServicesRequest) (*storage_v1.GetServicesResponse, error)
- func (s *GRPCHandler) GetTrace(r *storage_v1.GetTraceRequest, ...) error
- func (s *GRPCHandler) Register(ss *grpc.Server) error
- func (s *GRPCHandler) WriteArchiveSpan(ctx context.Context, r *storage_v1.WriteSpanRequest) (*storage_v1.WriteSpanResponse, error)
- func (s *GRPCHandler) WriteSpan(ctx context.Context, r *storage_v1.WriteSpanRequest) (*storage_v1.WriteSpanResponse, error)
- func (s *GRPCHandler) WriteSpanStream(stream storage_v1.StreamingSpanWriterPlugin_WriteSpanStreamServer) error
- type GRPCHandlerStorageImpl
- type PluginCapabilities
- type PluginServices
- type StorageGRPCPlugin
- type StoragePlugin
- type StreamingSpanWriterPlugin
Constants ¶
const BearerTokenKey = "bearer.token"
BearerTokenKey is the key name for the bearer token context value.
const StoragePluginIdentifier = "storage_plugin"
StoragePluginIdentifier is the identifier that is shared by plugin and host.
Variables ¶
var Handshake = plugin.HandshakeConfig{
MagicCookieKey: "STORAGE_PLUGIN",
MagicCookieValue: "jaeger",
}
Handshake is a common handshake that is shared by plugin and host.
var PluginMap = map[string]plugin.Plugin{ StoragePluginIdentifier: &StorageGRPCPlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
func NewGRPCClient ¶
func NewGRPCClient(c *grpc.ClientConn) *grpcClient
Types ¶
type ArchiveStoragePlugin ¶
type ArchiveStoragePlugin interface { ArchiveSpanReader() spanstore.Reader ArchiveSpanWriter() spanstore.Writer }
ArchiveStoragePlugin is the interface we're exposing as a plugin.
type Capabilities ¶
Capabilities contains information about plugin capabilities
type ContextUpgradeFunc ¶
ContextUpgradeFunc is a functional type that can be composed to upgrade context
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 NewGRPCHandlerWithPlugins ¶
func NewGRPCHandlerWithPlugins( mainImpl StoragePlugin, archiveImpl ArchiveStoragePlugin, streamImpl StreamingSpanWriterPlugin, ) *GRPCHandler
NewGRPCHandler creates a handler given implementations grouped by plugin services.
func (*GRPCHandler) Capabilities ¶
func (s *GRPCHandler) Capabilities(ctx context.Context, request *storage_v1.CapabilitiesRequest) (*storage_v1.CapabilitiesResponse, error)
func (*GRPCHandler) Close ¶
func (s *GRPCHandler) Close(ctx context.Context, r *storage_v1.CloseWriterRequest) (*storage_v1.CloseWriterResponse, error)
func (*GRPCHandler) FindTraceIDs ¶
func (s *GRPCHandler) FindTraceIDs(ctx context.Context, r *storage_v1.FindTraceIDsRequest) (*storage_v1.FindTraceIDsResponse, error)
FindTraceIDs retrieves traceIDs that match the traceQuery
func (*GRPCHandler) FindTraces ¶
func (s *GRPCHandler) FindTraces(r *storage_v1.FindTracesRequest, stream storage_v1.SpanReaderPlugin_FindTracesServer) error
FindTraces streams traces that match the traceQuery
func (*GRPCHandler) GetArchiveTrace ¶
func (s *GRPCHandler) GetArchiveTrace(r *storage_v1.GetTraceRequest, stream storage_v1.ArchiveSpanReaderPlugin_GetArchiveTraceServer) error
func (*GRPCHandler) GetDependencies ¶
func (s *GRPCHandler) GetDependencies(ctx context.Context, r *storage_v1.GetDependenciesRequest) (*storage_v1.GetDependenciesResponse, error)
GetDependencies returns all interservice dependencies
func (*GRPCHandler) GetOperations ¶
func (s *GRPCHandler) GetOperations( ctx context.Context, r *storage_v1.GetOperationsRequest, ) (*storage_v1.GetOperationsResponse, error)
GetOperations returns the operations of a given service
func (*GRPCHandler) GetServices ¶
func (s *GRPCHandler) GetServices(ctx context.Context, r *storage_v1.GetServicesRequest) (*storage_v1.GetServicesResponse, error)
GetServices returns a list of all known services
func (*GRPCHandler) GetTrace ¶
func (s *GRPCHandler) GetTrace(r *storage_v1.GetTraceRequest, stream storage_v1.SpanReaderPlugin_GetTraceServer) error
GetTrace takes a traceID and streams a Trace associated with that traceID
func (*GRPCHandler) Register ¶
func (s *GRPCHandler) Register(ss *grpc.Server) error
Register registers the server as gRPC methods handler.
func (*GRPCHandler) WriteArchiveSpan ¶
func (s *GRPCHandler) WriteArchiveSpan(ctx context.Context, r *storage_v1.WriteSpanRequest) (*storage_v1.WriteSpanResponse, error)
func (*GRPCHandler) WriteSpan ¶
func (s *GRPCHandler) WriteSpan(ctx context.Context, r *storage_v1.WriteSpanRequest) (*storage_v1.WriteSpanResponse, error)
WriteSpan saves the span
func (*GRPCHandler) WriteSpanStream ¶
func (s *GRPCHandler) WriteSpanStream(stream storage_v1.StreamingSpanWriterPlugin_WriteSpanStreamServer) error
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 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 ¶
type PluginCapabilities interface {
Capabilities() (*Capabilities, error)
}
PluginCapabilities allow expose plugin its capabilities.
type PluginServices ¶
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 ¶
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 ¶
StreamingSpanWriterPlugin is the interface we're exposing as a plugin.