Help us shape the future of Go! Take the 2026 Go Developer Survey

sync

package module
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sync 是 git-ferry-core 的库入口:配置加载与 Service 构造。

本库**不提供任何 HTTP/Web 服务端**,也不依赖 hertz/gin 等 Web 框架。 不包含用户登录 / API Key / SSO 等鉴权;入站 Webhook 由壳层收包后 转成 service.WebhookPayload 再调用 Service.ReceiveWebhook。 Config.Server 仅含 Host/Port/Mode,core 自身不会监听端口。

详细子域见 model / service / executor / dao / lock。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config = model.Config

func LoadConfig

func LoadConfig(path string) (*Config, error)

type Option added in v0.9.0

type Option = service.Option

Option 装配期依赖注入(WithDB / WithProviderHooks / WithForcePushApprover)。

type Service

type Service = service.Service

func NewService

func NewService(cfg *Config, opts ...Option) (*Service, error)

type WebhookPayload

type WebhookPayload = service.WebhookPayload

WebhookPayload 协议无关的 Webhook 入站载荷(由壳层构造)。

Directories

Path Synopsis
Package health 实现仓库/任务健康评分的可配置规则 DSL(借鉴 Port Scorecards)。
Package health 实现仓库/任务健康评分的可配置规则 DSL(借鉴 Port Scorecards)。
Package mirror 提供"双仓双身份"的 Go module 镜像发布。
Package mirror 提供"双仓双身份"的 Go module 镜像发布。
pkg
deploykey
Package deploykey 生成镜像部署用 Ed25519 密钥对(壳层 ops/deploy-key 端点下沉)。
Package deploykey 生成镜像部署用 Ed25519 密钥对(壳层 ops/deploy-key 端点下沉)。
proclog
Package proclog 进程级日志初始化与失败退出。
Package proclog 进程级日志初始化与失败退出。
strutil
Package strutil 收敛 core 内字符串小工具,消除 executor/service 重复实现。
Package strutil 收敛 core 内字符串小工具,消除 executor/service 重复实现。
Package tpl 提供同步策略模板库(借鉴 Renovate packageRules/presets)。
Package tpl 提供同步策略模板库(借鉴 Renovate packageRules/presets)。

Jump to

Keyboard shortcuts

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