apiserver

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 4 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 {
	ServerMode string
	JWTKey     string
	Expiration time.Duration
}

Config 配置结构体,用于存储应用相关的配置. 不用 viper.Get,是因为这种方式能更加清晰的知道应用提供了哪些配置项.

func (*Config) NewUnionServer

func (cfg *Config) NewUnionServer() (*UnionServer, error)

NewUnionServer 根据配置创建联合服务器.

type UnionServer

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

UnionServer 定义一个联合服务器. 根据 ServerMode 决定要启动的服务器类型.

func (*UnionServer) Run

func (s *UnionServer) Run() error

Run 运行应用.

Jump to

Keyboard shortcuts

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