fssync

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildManifest added in v1.1.6

func BuildManifest(rootDir string, ignorer *PathIgnorer) (map[string]string, error)

func ComputeFileHash

func ComputeFileHash(filePath string) (string, error)

Types

type Client

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

func NewClient

func NewClient(cfg ClientConfig) (*Client, error)

func (*Client) Run

func (c *Client) Run() error

type ClientConfig

type ClientConfig struct {
	ServerAddr  string
	SyncDir     string
	DeleteExtra bool
	Insecure    bool
	DryRun      bool
}

type FileContent added in v1.1.6

type FileContent struct {
	Path    string `json:"path"`
	Content []byte `json:"content"`
}

type FileRequest added in v1.1.6

type FileRequest struct {
	Paths []string `json:"paths"`
}

type FilesResponse added in v1.1.6

type FilesResponse struct {
	Files []FileContent `json:"files"`
}

type ManifestResponse added in v1.1.6

type ManifestResponse struct {
	Files map[string]string `json:"files"`
}

type PathIgnorer

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

func NewPathIgnorer

func NewPathIgnorer(ignoreStr string) *PathIgnorer

func (*PathIgnorer) IsIgnored

func (pi *PathIgnorer) IsIgnored(path string) bool

type Server

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

func NewServer

func NewServer(cfg ServerConfig) (*Server, error)

func (*Server) Run

func (s *Server) Run() error

type ServerConfig

type ServerConfig struct {
	Port        int
	SyncDir     string
	IgnorePaths string
	EnableTLS   bool
}

Jump to

Keyboard shortcuts

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