grpcs

package
v0.2.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() lava.Service

func NewInner

func NewInner(handlers []lava.GrpcRouter, dixMiddlewares []lava.Middleware, metric metrics.Metric, log log.Logger) *lava.InnerServer

NewInner grpc 服务内部通信

func NewMux

func NewMux(handlers []lava.GrpcRouter, dixMiddlewares []lava.Middleware, metric metrics.Metric, log log.Logger) *gateway.Mux

Types

type Config

type Config struct {
	EnablePrintRoutes bool                 `yaml:"enable_print_routes"`
	BaseUrl           string               `yaml:"base_url"`
	GrpcConfig        *grpc_builder.Config `yaml:"grpc_config"`
	EnableCors        bool                 `yaml:"enable_cors"`
	EnablePingPong    bool                 `yaml:"enable_ping_pong"`

	// unix seconds
	PingPongTime int32 `yaml:"ping_pong_time"`
	GrpcPort     *int  `yaml:"grpc_port"`
	HttpPort     *int  `yaml:"http_port"`
}

type DefaultQueryParser

type DefaultQueryParser struct{}

func (*DefaultQueryParser) Parse

func (*DefaultQueryParser) Parse(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error

Parse populates "values" into "msg". A value is ignored if its key starts with one of the elements in "filter".

type GrpcServerConfigLoader

type GrpcServerConfigLoader struct {
	GrpcServer *Config `yaml:"grpc_server"`
}

Jump to

Keyboard shortcuts

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