datasync

package
v0.33.23 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(b, flag Mode) bool

Types

type Client

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

func New

func New(logger *zerolog.Logger, store *bdb.BoltDB) *Client

func (*Client) Sync

func (c *Client) Sync(ctx context.Context, conn *grpc.ClientConn, opts ...Option) error

type Mode

type Mode int32
const (
	Unknown   Mode = 0         // unknown mode (default)
	Manifest  Mode = 1 << iota // sync directory manifest
	Full                       // sync all state from source (INSERT/UPDATE)
	Diff                       // sync all state from source (INSERT/UPDATE) and compare against target (DELETE)
	Watermark                  // sync all changes since last watermark timestamp (INSERT/UPDATE)
)

func Clear

func Clear(b, flag Mode) Mode

func Set

func Set(b, flag Mode) Mode

func StrToMode

func StrToMode(s string) Mode

func Toggle

func Toggle(b, flag Mode) Mode

func (Mode) RunMode

func (m Mode) RunMode() string

func (Mode) String

func (m Mode) String() string

type Option

type Option func(*Options)

func WithMode

func WithMode(mode Mode) Option

type Options

type Options struct {
	Mode Mode
}

type Sync

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

func (*Sync) Run

func (s *Sync) Run(ctx context.Context, conn *grpc.ClientConn) error

type SyncClient

type SyncClient interface {
	Sync(ctx context.Context, conn *grpc.ClientConn, opts ...Option) error
}

Jump to

Keyboard shortcuts

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