grpc

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServer

func CreateServer(s *Settings) *grpc.Server

CreateServer will create a grpc server with tracing, prometheus stats, and logging

func Dial

func Dial(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Dial creates a client connection to the given target

func HostMetrics

func HostMetrics(ctx context.Context, port int) func() error

HostMetrics will host the prometheus metrics

func HostServer

func HostServer(ctx context.Context, server *grpc.Server, port int) func() error

HostServer will host the grpc server and gracefully stop if the context is completed

func WaitTillServiceIsAvailable

func WaitTillServiceIsAvailable(host string, port int, duration time.Duration) error

WaitTillServiceIsAvailable uses the ping service to wait till a grpc server is available

func WithInsecure

func WithInsecure() grpc.DialOption

WithInsecure returns a DialOption which disables transport security for this ClientConn. Note that transport security is required unless WithInsecure is set.

Types

type Settings

type Settings struct {
	JaegerAgentHost            string
	DefaultUDPSpanServerPort   string
	ServerName                 string
	BiDirectionalStreamTimeout time.Duration
	Sampler                    jaegerClient.Sampler
}

Settings are the settings for the grpc service

Jump to

Keyboard shortcuts

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