mock

package
v0.4.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadCloser

type ReadCloser struct {
	CloseFunc func() error
	ReadFunc  func([]byte) (int, error)
}

func (*ReadCloser) Close

func (r *ReadCloser) Close() error

func (*ReadCloser) Read

func (r *ReadCloser) Read(b []byte) (int, error)

type ReplicaClient

type ReplicaClient struct {
	GenerationsFunc       func(ctx context.Context) ([]string, error)
	DeleteGenerationFunc  func(ctx context.Context, generation string) error
	SnapshotsFunc         func(ctx context.Context, generation string) (litestream.SnapshotIterator, error)
	WriteSnapshotFunc     func(ctx context.Context, generation string, index int, r io.Reader) (litestream.SnapshotInfo, error)
	DeleteSnapshotFunc    func(ctx context.Context, generation string, index int) error
	SnapshotReaderFunc    func(ctx context.Context, generation string, index int) (io.ReadCloser, error)
	WALSegmentsFunc       func(ctx context.Context, generation string) (litestream.WALSegmentIterator, error)
	WriteWALSegmentFunc   func(ctx context.Context, pos litestream.Pos, r io.Reader) (litestream.WALSegmentInfo, error)
	DeleteWALSegmentsFunc func(ctx context.Context, a []litestream.Pos) error
	WALSegmentReaderFunc  func(ctx context.Context, pos litestream.Pos) (io.ReadCloser, error)
}

func (*ReplicaClient) DeleteGeneration

func (c *ReplicaClient) DeleteGeneration(ctx context.Context, generation string) error

func (*ReplicaClient) DeleteSnapshot

func (c *ReplicaClient) DeleteSnapshot(ctx context.Context, generation string, index int) error

func (*ReplicaClient) DeleteWALSegments

func (c *ReplicaClient) DeleteWALSegments(ctx context.Context, a []litestream.Pos) error

func (*ReplicaClient) Generations

func (c *ReplicaClient) Generations(ctx context.Context) ([]string, error)

func (*ReplicaClient) SnapshotReader

func (c *ReplicaClient) SnapshotReader(ctx context.Context, generation string, index int) (io.ReadCloser, error)

func (*ReplicaClient) Snapshots

func (c *ReplicaClient) Snapshots(ctx context.Context, generation string) (litestream.SnapshotIterator, error)

func (*ReplicaClient) Type

func (c *ReplicaClient) Type() string

func (*ReplicaClient) WALSegmentReader

func (c *ReplicaClient) WALSegmentReader(ctx context.Context, pos litestream.Pos) (io.ReadCloser, error)

func (*ReplicaClient) WALSegments

func (c *ReplicaClient) WALSegments(ctx context.Context, generation string) (litestream.WALSegmentIterator, error)

func (*ReplicaClient) WriteSnapshot

func (c *ReplicaClient) WriteSnapshot(ctx context.Context, generation string, index int, r io.Reader) (litestream.SnapshotInfo, error)

func (*ReplicaClient) WriteWALSegment

func (c *ReplicaClient) WriteWALSegment(ctx context.Context, pos litestream.Pos, r io.Reader) (litestream.WALSegmentInfo, error)

type SnapshotIterator

type SnapshotIterator struct {
	CloseFunc    func() error
	NextFunc     func() bool
	ErrFunc      func() error
	SnapshotFunc func() litestream.SnapshotInfo
}

func (*SnapshotIterator) Close

func (itr *SnapshotIterator) Close() error

func (*SnapshotIterator) Err

func (itr *SnapshotIterator) Err() error

func (*SnapshotIterator) Next

func (itr *SnapshotIterator) Next() bool

func (*SnapshotIterator) Snapshot

func (itr *SnapshotIterator) Snapshot() litestream.SnapshotInfo

type WALSegmentIterator

type WALSegmentIterator struct {
	CloseFunc      func() error
	NextFunc       func() bool
	ErrFunc        func() error
	WALSegmentFunc func() litestream.WALSegmentInfo
}

func (*WALSegmentIterator) Close

func (itr *WALSegmentIterator) Close() error

func (*WALSegmentIterator) Err

func (itr *WALSegmentIterator) Err() error

func (*WALSegmentIterator) Next

func (itr *WALSegmentIterator) Next() bool

func (*WALSegmentIterator) WALSegment

func (itr *WALSegmentIterator) WALSegment() litestream.WALSegmentInfo

Jump to

Keyboard shortcuts

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