server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChallengeCache

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

ChallengeCache 存储 ACME challenge token 和 response 的映射

func (*ChallengeCache) CleanExpired

func (c *ChallengeCache) CleanExpired()

CleanExpired 清理所有过期的 challenge

func (*ChallengeCache) Delete

func (c *ChallengeCache) Delete(token string)

Delete 删除 challenge

func (*ChallengeCache) Get

func (c *ChallengeCache) Get(token string) (string, bool)

Get 获取 challenge response

func (*ChallengeCache) GetDomain

func (c *ChallengeCache) GetDomain(token string) (string, bool)

GetDomain 获取 token 对应的域名

func (*ChallengeCache) Set

func (c *ChallengeCache) Set(token, response, domain string, ttl time.Duration)

Set 设置 challenge,带过期时间

type HTTPServer

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

HTTPServer HTTP-01 验证服务器

func NewHTTPServer

func NewHTTPServer() *HTTPServer

NewHTTPServer 创建新的 HTTP 服务器

func (*HTTPServer) RemoveChallenge

func (s *HTTPServer) RemoveChallenge(token string)

RemoveChallenge 移除 challenge

func (*HTTPServer) SetChallenge

func (s *HTTPServer) SetChallenge(token, response, domain string)

SetChallenge 设置 challenge token 和 response,10 分钟后过期

func (*HTTPServer) Start

func (s *HTTPServer) Start() error

Start 启动 HTTP 服务器

func (*HTTPServer) Stop

func (s *HTTPServer) Stop(ctx context.Context) error

Stop 停止 HTTP 服务器

Jump to

Keyboard shortcuts

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