fast

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileFastBackend

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

FileFastBackend is a file-backed app.FastBackend implementation with support for TTL

func NewFileFastBackend

func NewFileFastBackend(dataDir string) (*FileFastBackend, error)

func (*FileFastBackend) Delete

func (f *FileFastBackend) Delete(c context.Context, identifier string) error

func (*FileFastBackend) Retrieve

func (f *FileFastBackend) Retrieve(c context.Context, identifier string) (io.ReadCloser, error)

func (*FileFastBackend) Save

func (f *FileFastBackend) Save(c context.Context, identifier string, r io.ReadCloser) (int64, error)

func (*FileFastBackend) SaveTTL

func (f *FileFastBackend) SaveTTL(c context.Context, identifier string, r io.ReadCloser, ttl time.Duration) (int64, error)

type S3Config

type S3Config struct {
	Bucket         string
	Endpoint       string
	Region         string
	DisableSSL     bool
	AccessKey      string
	AccessSecret   string
	ForcePathStyle bool
}

type S3FastBackend

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

func NewS3FastBackend

func NewS3FastBackend(conf S3Config) (*S3FastBackend, error)

func (*S3FastBackend) Delete

func (s *S3FastBackend) Delete(c context.Context, identifier string) error

func (*S3FastBackend) Retrieve

func (s *S3FastBackend) Retrieve(c context.Context, identifier string) (io.ReadCloser, error)

func (*S3FastBackend) Save

func (s *S3FastBackend) Save(c context.Context, identifier string, r io.ReadCloser) (int64, error)

func (*S3FastBackend) SaveTTL

func (s *S3FastBackend) SaveTTL(c context.Context, identifier string, r io.ReadCloser, ttl time.Duration) (int64, error)

Jump to

Keyboard shortcuts

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