sync

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount added in v1.0.4

func Mount(ctx context.Context, cfg *config.Setting) (*mount.Mounter, error)

func Watch

func Watch(cfg *config.Setting, handlers []*Handler) (*watcher.Watcher, error)

Types

type Handler added in v1.0.2

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

func NewHandler added in v1.0.2

func NewHandler(cfg *config.Setting, statusCh chan<- SyncEvent) (*Handler, error)

func (*Handler) Close added in v1.0.2

func (h *Handler) Close()

func (*Handler) ConfigKey added in v1.0.4

func (h *Handler) ConfigKey() string

func (*Handler) FS added in v1.0.4

func (h *Handler) FS() *oss.FS

func (*Handler) HasChange added in v1.0.4

func (h *Handler) HasChange(cfg *config.Setting) bool

func (*Handler) Key added in v1.0.2

func (h *Handler) Key() string

func (*Handler) Mount added in v1.0.5

func (h *Handler) Mount() error

func (*Handler) Receive added in v1.0.2

func (h *Handler) Receive(ev *watcher.Event)

func (*Handler) Unmount added in v1.0.5

func (h *Handler) Unmount()

type SyncEvent added in v1.0.2

type SyncEvent struct {
	Handler    *Handler
	SettingKey string
	Status     SyncStatus
}

type SyncStatus added in v1.0.2

type SyncStatus int32
const (
	SyncComplete SyncStatus = iota
	SyncStart
)

type Syncer added in v1.0.1

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

func NewSyncer added in v1.0.1

func NewSyncer() *Syncer

func (*Syncer) Close added in v1.0.1

func (s *Syncer) Close()

func (*Syncer) Events added in v1.0.2

func (s *Syncer) Events() <-chan SyncEvent

func (*Syncer) Mount added in v1.0.5

func (s *Syncer) Mount(cfg *config.Setting)

func (*Syncer) Reload added in v1.0.1

func (s *Syncer) Reload(cfg *config.Config)

func (*Syncer) Start added in v1.0.1

func (s *Syncer) Start(ctx context.Context, cfg *config.Config) error

func (*Syncer) Sync added in v1.0.2

func (s *Syncer) Sync(cfg *config.Setting)

func (*Syncer) SyncAll added in v1.0.2

func (s *Syncer) SyncAll()

Jump to

Keyboard shortcuts

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