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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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