grpc

package
v0.0.0-...-b105b8e Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 16 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 InstallProtocPlugins

func InstallProtocPlugins()

func SetPort

func SetPort(port string)

Types

type Adapter

type Adapter struct {
	RunHttpServer bool
	// contains filtered or unexported fields
}

Adapter struct to save apps that implement grpc adapters and set port that grpc server should run

func New

func New(port string) Adapter

func (*Adapter) Add

func (g *Adapter) Add(app AppI)

func (Adapter) GetApps

func (g Adapter) GetApps() []api.App

func (Adapter) GetName

func (g Adapter) GetName() string

func (Adapter) Run

func (g Adapter) Run() error

Run method that implements Adapter interface

type AppI

type AppI interface {
	api.App
	Register(grpcServer *grpc.Server, mux *runtime.ServeMux) error
	GetInterceptor() grpc.UnaryServerInterceptor
}

Jump to

Keyboard shortcuts

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