grpc

package
v0.0.0-...-9d0e06d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerEndpoint = "localhost:8080"
)

Functions

func FindSwaggerJSONFiles

func FindSwaggerJSONFiles(baseDir string) ([]string, error)

FindSwaggerJSONFiles finds all files in the base directory that have ".swagger.json" in their names.

func GenerateSwaggerHTML

func GenerateSwaggerHTML(outputPath string, jsonFiles ...string) error

GenerateSwaggerHTML generates an HTML Swagger file based on multiple JSON files.

func GetClientConnection

func GetClientConnection(serverAddr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

func InstallProtocPlugins

func InstallProtocPlugins()

func StartGrpcServer

func StartGrpcServer(port string, services ...Services) error

Types

type Services

type Services interface {
	Register(s *grpc.Server, httpServer *runtime.ServeMux) error
	GetInterceptor() grpc.UnaryServerInterceptor
	GetServiceName() string
}

Jump to

Keyboard shortcuts

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