grpc

package
v0.0.0-...-692e367 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(runtime runtime.Runtime, name string, options *server.GRPCServerOptions) server.GRPCServer

NewServer - init and return new grpc server instance

Types

type Config

type Config struct {
	ID   string
	Name string `env:"GRPC_SERVER_NAME" envDefault:"" comment:"Set GRPC server name"`

	Host string `env:"GRPC_SERVER_LISTEN" envDefault:"0.0.0.0" comment:"Set GRPC server listen host"`
	Port int    `env:"GRPC_SERVER_PORT" envDefault:"9000" comment:"Set GRPC server listen port"`

	MaxConnSize    int `env:"GRPC_SERVER_MAX_CONNECTION_SIZE"   comment:"Sets the max simultaneous connections for server (default unlimited)"`
	MaxRecvMsgSize int `` /* 148-byte string literal not displayed */
	MaxSendMsgSize int `` /* 142-byte string literal not displayed */

	IsDisable bool `env:"GRPC_SERVER_DISABLED" envDefault:"false" comment:"GRPC server disable (default: false)"`

	GrpcOptions []grpc.ServerOption `env:"GRPC_SERVER_OPTIONS" envSeparator:"," comment:"Set GRPC server additional options (key=value,key2=value2)"`
	TLSConfig   *tls.Config

	GRPCWebHost string `env:"GRPC_WEB_SERVER_LISTEN" envDefault:"0.0.0.0" comment:"Set GRPC WEB server listen host"`
	GRPCWebPort int    `env:"GRPC_WEB_SERVER_PORT" comment:"Set GRPC WEB server listen host"`

	GrpcWebOptions []grpcweb.Option

	RegisterInterval time.Duration
	RegisterTTL      time.Duration
}

type Interceptors

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

func (*Interceptors) Add

func (*Interceptors) AddConstructor

func (i *Interceptors) AddConstructor(h interface{})

Jump to

Keyboard shortcuts

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