mock

package
v0.2.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	StreamFunc func(ctx context.Context, rawurl string, id string, posMap map[string]litefs.Pos) (io.ReadCloser, error)
}

func (*Client) Stream

func (c *Client) Stream(ctx context.Context, rawurl string, id string, posMap map[string]litefs.Pos) (io.ReadCloser, error)

type Lease

type Lease struct {
	RenewedAtFunc func() time.Time
	TTLFunc       func() time.Duration
	RenewFunc     func(ctx context.Context) error
	CloseFunc     func() error
}

func (*Lease) Close

func (l *Lease) Close() error

func (*Lease) Renew

func (l *Lease) Renew(ctx context.Context) error

func (*Lease) RenewedAt

func (l *Lease) RenewedAt() time.Time

func (*Lease) TTL

func (l *Lease) TTL() time.Duration

type Leaser

type Leaser struct {
	CloseFunc        func() error
	AdvertiseURLFunc func() string
	AcquireFunc      func(ctx context.Context) (litefs.Lease, error)
	PrimaryInfoFunc  func(ctx context.Context) (litefs.PrimaryInfo, error)
}

func (*Leaser) Acquire

func (l *Leaser) Acquire(ctx context.Context) (litefs.Lease, error)

func (*Leaser) AdvertiseURL

func (l *Leaser) AdvertiseURL() string

func (*Leaser) Close

func (l *Leaser) Close() error

func (*Leaser) PrimaryInfo

func (l *Leaser) PrimaryInfo(ctx context.Context) (litefs.PrimaryInfo, error)

Jump to

Keyboard shortcuts

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