server

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustLoadTLS

func MustLoadTLS(c *conf.TLSConfig) *tls.Config

MustLoadTLS 从配置加载 TLS 证书。 如果加载失败会 panic,因为 TLS 配置错误是严重的启动时错误。

func RegisterPlugins added in v0.2.0

func RegisterPlugins(r *runtime.Registry, plugins ...runtime.ServerPlugin) error

RegisterPlugins 批量注册 server plugin。

Types

type EndpointProvider

type EndpointProvider interface {
	Endpoint() (*url.URL, error)
}

EndpointProvider 定义服务注册地址契约。

type Lifecycle

type Lifecycle interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
}

Lifecycle 定义服务启停契约。

type Server

type Server interface {
	Lifecycle
	EndpointProvider
}

Server 聚合 transport 扩展服务的最小能力集合。

Directories

Path Synopsis
Package middleware 提供服务器中间件链构建工具。
Package middleware 提供服务器中间件链构建工具。

Jump to

Keyboard shortcuts

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