grpc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 13 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"`

	BackendURL []string `mapstructure:"backend-url"`
	UIMessage  string   `mapstructure:"ui-message"`
	UIColor    string   `mapstructure:"ui-color"`
	UIPath     string   `mapstructure:"ui-path"`
	DataPath   string   `mapstructure:"data-path"`
	ConfigPath string   `mapstructure:"config-path"`
	CertPath   string   `mapstructure:"cert-path"`
	Host       string   `mapstructure:"host"`
	//Port                  string        `mapstructure:"port"`
	SecurePort      string `mapstructure:"secure-port"`
	PortMetrics     int    `mapstructure:"port-metrics"`
	Hostname        string `mapstructure:"hostname"`
	H2C             bool   `mapstructure:"h2c"`
	RandomDelay     bool   `mapstructure:"random-delay"`
	RandomDelayUnit string `mapstructure:"random-delay-unit"`
	RandomDelayMin  int    `mapstructure:"random-delay-min"`
	RandomDelayMax  int    `mapstructure:"random-delay-max"`
	RandomError     bool   `mapstructure:"random-error"`
	Unhealthy       bool   `mapstructure:"unhealthy"`
	Unready         bool   `mapstructure:"unready"`
	JWTSecret       string `mapstructure:"jwt-secret"`
	CacheServer     string `mapstructure:"cache-server"`
}

type PanicServer

type PanicServer struct {
	pb.UnimplementedPanicServiceServer
	// contains filtered or unexported fields
}

func (*PanicServer) Panic

func (s *PanicServer) Panic(ctx context.Context, req *pb.PanicRequest) (*pb.PanicResponse, error)

type Server

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

func NewMockGrpcServer

func NewMockGrpcServer() *Server

func NewServer

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

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() *grpc.Server

type VersionServer

type VersionServer struct {
	pb.UnimplementedVersionServiceServer
	// contains filtered or unexported fields
}

func (*VersionServer) Version

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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