server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCRegister

type GRPCRegister func(grpc.ServiceRegistrar)

func GetGRPCRegister

func GetGRPCRegister[T interface{}](register func(grpc.ServiceRegistrar, T), service T) GRPCRegister

type GrpcOption

type GrpcOption struct {
	Port string `json:"port" mapstructure:"port"`
	TLS  bool   `json:"tls" mapstructure:"tls"`
}

func NewGrpcOption

func NewGrpcOption() *GrpcOption

func (GrpcOption) AddFlags

func (o GrpcOption) AddFlags(fs *pflag.FlagSet)

func (GrpcOption) Validate

func (o GrpcOption) Validate() error

type HttpOption

type HttpOption struct {
	Port               string `json:"port" mapstructure:"port"`
	TLS                bool   `json:"tls" mapstructure:"tls"`
	MaxRequestBodySize int    `json:"maxRequestBodySize" mapstructure:"max-request-body-size"`
}

func NewHttpOption

func NewHttpOption() *HttpOption

func (HttpOption) AddFlags

func (o HttpOption) AddFlags(fs *pflag.FlagSet)

func (HttpOption) Validate

func (o HttpOption) Validate() error

type Options

type Options struct {
	Grpc        *GrpcOption `json:"grpc" mapstructure:"grpc"`
	Http        *HttpOption `json:"http" mapstructure:"http"`
	CertFile    string      `json:"certFile" mapstructure:"cert-file"`
	KeyFile     string      `json:"keyFile" mapstructure:"key-file"`
	CaFile      string      `json:"caFile" mapstructure:"ca-file"`
	WomtoolFile string      `json:"womtoolFile" mapstructure:"womtool-file"`
}

Options stands for server options.

func NewOptions

func NewOptions() *Options

func (Options) AddFlags

func (o Options) AddFlags(fs *pflag.FlagSet)

func (Options) Validate

func (o Options) Validate() error

type RouteRegister

type RouteRegister interface {
	AddRoute(route.IRouter)
}

Jump to

Keyboard shortcuts

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