datasync

package
v0.31.9 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 32 Imported by: 2

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, validator *protovalidate.Validator) *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) 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