server

package
v0.0.0-...-50a42c1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts ...Option)

Types

type Config

type Config struct {
	Insecure          bool
	Compress          bool // if true, add compression handling to messages
	UseZipkin         bool // if true, add zipkin tracing
	CertFilename      string
	KeyFilename       string
	HTTPListenPort    int
	RPCListenPort     int
	MetricsListenPort int
	Handler           http.Handler
	Hostname          string // if present, enforce canonical hostnames
	RPCRegister       RPCRegistration
	// contains filtered or unexported fields
}

type Option

type Option func(*Config) error

func WithCanonicalHost

func WithCanonicalHost(hostname string) Option

func WithCertificate

func WithCertificate(certFilename, keyFilename string) Option

func WithHTTPListenPort

func WithHTTPListenPort(port int) Option

func WithHTTPServer

func WithHTTPServer(h http.Handler) Option

func WithLogger

func WithLogger(l *zap.Logger) Option

func WithMetricsListenPort

func WithMetricsListenPort(port int) Option

func WithRPCListenPort

func WithRPCListenPort(port int) Option

func WithRPCServer

func WithRPCServer(fn RPCRegistration) Option

func WithServiceName

func WithServiceName(serviceName string) Option

func WithZipkinTracer

func WithZipkinTracer() Option

type RPCRegistration

type RPCRegistration func(*grpc.Server) error

Jump to

Keyboard shortcuts

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