server

package
v0.0.0-...-e3be96e Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyCompressor

type EmptyCompressor string

type Server

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

func NewServer

func NewServer(opts ...ServerOption) *Server

func (*Server) Listen

func (s *Server) Listen(network, address string) error

func (*Server) MustRun

func (s *Server) MustRun()

func (*Server) Run

func (s *Server) Run() error

func (*Server) Stop

func (s *Server) Stop() error

type ServerOption

type ServerOption func(*Server)

func Address

func Address(addr string) ServerOption

Address with server address.

func AllowHealthCheck

func AllowHealthCheck(allow bool) ServerOption

AllowHealthCheck determines whether to use health.

func AllowReflection

func AllowReflection(allow bool) ServerOption

AllowReflection determines whether to use reflection.

func Compressor

func Compressor(compressor encoding.Compressor) ServerOption

Compressor with server address.

func GRPCOptions

func GRPCOptions(opts ...grpc.ServerOption) ServerOption

GRPCOptions with grpc options.

func Network

func Network(network string) ServerOption

Network with server network.

func StreamInterceptor

func StreamInterceptor(in ...grpc.StreamServerInterceptor) ServerOption

StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the server.

func TLSConfig

func TLSConfig(c *tls.Config) ServerOption

TLSConfig with TLS config.

func UnaryInterceptor

func UnaryInterceptor(in ...grpc.UnaryServerInterceptor) ServerOption

UnaryInterceptor returns a ServerOption that sets the UnaryServerInterceptor for the server.

Directories

Path Synopsis
compressor
gzip
Package gzip implements and registers the gzip compressor
Package gzip implements and registers the gzip compressor
interceptor
test
api

Jump to

Keyboard shortcuts

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