server

package
v0.0.0-...-83edfdb Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFnSpan

func NewFnSpan(s opentracing.Span) opentracing.Span

NewFnSpan returns a new FnSpan which wraps the specified Span

func NewFnTracer

func NewFnTracer(t opentracing.Tracer) opentracing.Tracer

NewFnTracer returns a new FnTracer which wraps the specified Tracer

func NewPrometheusCollector

func NewPrometheusCollector() (zipkintracer.Collector, error)

NewPrometheusCollector returns a new PrometheusCollector

Types

type FnSpan

type FnSpan struct {
	opentracing.Span
}

FnSpan is a custom Span that wraps another span which adds some extra behaviour required for sending tracing spans to prometheus

func (FnSpan) Finish

func (fns FnSpan) Finish()

Finish implements opentracing.Span

func (FnSpan) FinishWithOptions

func (fns FnSpan) FinishWithOptions(opts opentracing.FinishOptions)

FinishWithOptions implements opentracing.Span

type FnTracer

type FnTracer struct {
	opentracing.Tracer
}

FnTracer is a custom Tracer which wraps another another tracer its main purpose is to wrap the underlying Span in a FnSpan, which adds some extra behaviour required for sending tracing spans to prometheus

func (FnTracer) StartSpan

func (fnt FnTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span

StartSpan implements opentracing.Tracer Override StartSpan to wrap the returned Span in a FnSpan

type InternalServer

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

InternalServer handles the node-local service (servicing graphs on this node only)

func NewInternalFlowService

func NewInternalFlowService(flows model.FlowServiceServer, listen string) (*InternalServer, error)

NewInternalFlowService creates a new flow service for a given graph API

func (*InternalServer) Run

func (s *InternalServer) Run() error

Run starts the server and blocks until it closes

type PrometheusCollector

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

PrometheusCollector is a custom Collector which sends ZipKin traces to Prometheus

func (PrometheusCollector) Close

func (PrometheusCollector) Close() error

Close implements Collector.

func (PrometheusCollector) Collect

func (pc PrometheusCollector) Collect(span *zipkincore.Span) error

Collect implements Collector.

type Server

type Server struct {
	Engine *gin.Engine
	// contains filtered or unexported fields
}

Server is the flow service root

func NewAPIServer

func NewAPIServer(clusterManager *cluster.Manager, restListen string, grpcListen string, zipkinURL string) (*Server, error)

NewAPIServer creates a new API server - params are injected dependencies

func (*Server) Run

func (s *Server) Run() error

Run starts the server

Jump to

Keyboard shortcuts

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