Help us shape the future of Go! Take the 2026 Go Developer Survey

migrator

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MigrationTimeout     = 30 * time.Second
	ErrClosedPrematurely = errors.New("client closed before ready")
	ErrClosed            = errors.New("client closed")
)
View Source
var (
	ErrSkip = errors.New("Skiped")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() *Client

func (*Client) Close

func (cli *Client) Close()

func (*Client) Connect

func (cli *Client) Connect(addr string) (err error)

func (*Client) GetStoreAdapter

func (cli *Client) GetStoreAdapter(store types.Storage) *StorageAdapter

func (*Client) Initiate

func (cli *Client) Initiate(initiator func() error) error

func (*Client) IsReady

func (cli *Client) IsReady() bool

func (*Client) Migrate

func (cli *Client) Migrate(reader resp.ResponseReader, store types.Storage)

func (*Client) Ready

func (cli *Client) Ready() <-chan error

func (*Client) Send

func (cli *Client) Send(cmd string, stream resp.AllReadCloser, args ...string) (resp.ResponseReader, error)

func (*Client) SetError

func (cli *Client) SetError(err error)

func (*Client) SetReady

func (cli *Client) SetReady()

func (*Client) TriggerDestination

func (cli *Client) TriggerDestination(dest string, args interface{}) (err error)

func (*Client) WaitForMigration

func (cli *Client) WaitForMigration(srv *redeo.Server)

type StorageAdapter

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

func (*StorageAdapter) Del

func (a *StorageAdapter) Del(key string, reason string) *types.OpRet

func (*StorageAdapter) Get

func (a *StorageAdapter) Get(key string) (string, []byte, *types.OpRet)

func (*StorageAdapter) GetStream

func (a *StorageAdapter) GetStream(key string) (string, resp.AllReadCloser, *types.OpRet)

func (*StorageAdapter) Id

func (s *StorageAdapter) Id() uint64

func (*StorageAdapter) Keys

func (a *StorageAdapter) Keys() <-chan string

func (*StorageAdapter) Len

func (a *StorageAdapter) Len() int

func (*StorageAdapter) LocalDel

func (a *StorageAdapter) LocalDel(key string)

func (*StorageAdapter) Meta

func (a *StorageAdapter) Meta() types.StorageMeta

func (*StorageAdapter) Migrate

func (a *StorageAdapter) Migrate(key string) (string, *types.OpRet)

func (*StorageAdapter) Restore

func (a *StorageAdapter) Restore() types.Storage

func (*StorageAdapter) Set

func (a *StorageAdapter) Set(key string, chunk string, val []byte) *types.OpRet

func (*StorageAdapter) SetStream

func (a *StorageAdapter) SetStream(key string, chunk string, valReader resp.AllReadCloser) *types.OpRet

Jump to

Keyboard shortcuts

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