grpc

package
v0.0.0-...-eac6ddc Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                        int           `mapstructure:"GRPC_PORT"`
	ServiceName                 string        `mapstructure:"GRPC_SERVICE_NAME"`
	RpcDeadline                 time.Duration `mapstructure:"GRPC_RPC_DEADLINE_IN_MS"`
	RpcRetries                  int           `mapstructure:"GRPC_RPC_RETRIES"`
	RpcRetryTimeout             time.Duration `mapstructure:"GRPC_RPC_RETRY_TIMEOUT_IN_MS"`
	RpcRetryBackoff             time.Duration `mapstructure:"GRPC_RPC_RETRY_BACKOFF_IN_MS"`
	EnableTls                   bool          `mapstructure:"GRPC_ENABLE_TLS"`
	CertificatePath             string        `mapstructure:"GRPC_CERT_PATH"`
	EnableDelayMiddleware       bool          `mapstructure:"ENABLE_RANDOM_DELAY"`
	EnableRandomErrorMiddleware bool          `mapstructure:"ENABLE_RANDOM_RANDOM_ERROR"`
	MinRandomDelay              int           `mapstructure:"RANDOM_DELAY_MIN"`
	MaxRandomDelay              int           `mapstructure:"RANDOM_DELAY_MAX"`
	DelayUnit                   string        `mapstructure:"RANDOM_DELAY_UNIT"`
	Version                     string        `mapstructure:"VERSION"`
	MetricAddr                  string        `mapstructure:"METRIC_CONNECTION_ADDRESS"`
}

type Server

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

func NewServer

func NewServer(config *Config, logger *zap.Logger) (*Server, error)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe()

Jump to

Keyboard shortcuts

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