interfaces

package
v0.0.0-...-560d035 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcServerInterface

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

func NewGrpcServerInterface

func NewGrpcServerInterface(addrs []string, cert *tls.Certificate, logger *zap.Logger) *GrpcServerInterface

func (*GrpcServerInterface) GetKind

func (iface *GrpcServerInterface) GetKind() string

Interface impl.

func (*GrpcServerInterface) GetServer

func (iface *GrpcServerInterface) GetServer() *grpc.Server

func (*GrpcServerInterface) PrependUnaryInterceptor

func (iface *GrpcServerInterface) PrependUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)

func (*GrpcServerInterface) PushUnaryInterceptor

func (iface *GrpcServerInterface) PushUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)

Note: *Not* thread safe. Interceptor chains run on the *unsafe* assumption that the backing array only gets mutated during construction/initialization, and in sequence at that.

func (*GrpcServerInterface) Start

func (iface *GrpcServerInterface) Start()

Interface impl.

func (*GrpcServerInterface) Stop

func (iface *GrpcServerInterface) Stop(deadline *time.Time)

Interface impl. @todo gRPC does not support deadlines on its own. We could wrap some timers given lots of spare time, but otherwise the main Runner will take care of imposing a hard deadline on the whole process.

type HttpServerInterface

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

func NewHttpServerInterface

func NewHttpServerInterface(addrs []string, cert *tls.Certificate, logger *zap.Logger) *HttpServerInterface

func (*HttpServerInterface) GetHandler

func (iface *HttpServerInterface) GetHandler() *gin.Engine

func (*HttpServerInterface) GetKind

func (iface *HttpServerInterface) GetKind() string

func (*HttpServerInterface) Start

func (iface *HttpServerInterface) Start()

Interface impl.

func (*HttpServerInterface) Stop

func (iface *HttpServerInterface) Stop(deadline *time.Time)

Interface impl.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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