grpc_rest_server

package module
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 18 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(logger *logrus.Logger, service any) server

Types

type Config

type Config struct {
	Host                   string
	Port                   string
	Mode                   string
	AllowedHeaders         []string
	AllowedOutgoingHeaders map[string]string

	ServiceDesc               *grpc.ServiceDesc
	RegisterRestHandlerServer func(ctx context.Context, mux *runtime.ServeMux, service any) error
	// By default 4 mb
	MaxRequestSize int
	// By default 4 mb
	MaxResponceSize int
	// Cert == nil, then insecure credentials will be used, only for grpc
	Cert *tls.Certificate
	// Used for REST
	TlsConfig *tls.Config
}

Jump to

Keyboard shortcuts

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