server

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCServer

func NewGRPCServer(addr string, logger log.Logger) (*grpc.Server, error)

NewGRPCServer 创建基于Eidola的gRPC服务器

func NewHTTPServer

func NewHTTPServer(addr string, logger log.Logger, svc ExampleService) (*http.HTTPServer, error)

NewHTTPServer 创建基于Mist的HTTP服务器

func StartServers

func StartServers(ctx context.Context, logger log.Logger) error

StartServers 启动HTTP和gRPC服务器

Types

type ExampleService

type ExampleService interface {
	SayHello(name string) string
}

定义示例服务接口

Jump to

Keyboard shortcuts

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