sync

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pull

func Pull() error

Pull 从云端拉取配置

func Push

func Push() error

Push 推送配置到云端

Types

type SSHSync

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

SSHSync SSH方式同步

func NewSSHSync

func NewSSHSync(cfg *config.SyncConfig) *SSHSync

NewSSHSync 创建SSH同步实例

func (*SSHSync) Pull

func (s *SSHSync) Pull() (*config.Config, error)

Pull 从远程服务器拉取配置

func (*SSHSync) Push

func (s *SSHSync) Push(cfg *config.Config) error

Push 推送配置到远程服务器

type Sync

type Sync interface {
	Pull() (*config.Config, error)
	Push(cfg *config.Config) error
}

Sync 同步接口

func NewSync

func NewSync(cfg *config.SyncConfig) (Sync, error)

NewSync 根据配置创建同步实例

Jump to

Keyboard shortcuts

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