content

package
v0.0.0-...-315957b Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCouldNotContent = errors.New("could not get content")
)

Functions

func Do

func Do(ctx context.Context, c bluesky.Client) error

func Start

func Start(token string, cacheClient cache.Client) error

Types

type CacheClientProcess

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

CacheClientProcess is an in process cache that adheres to larry's interface

func (*CacheClientProcess) Del

func (c *CacheClientProcess) Del(key string) error

func (*CacheClientProcess) Get

func (c *CacheClientProcess) Get(key string) (string, error)

func (*CacheClientProcess) Scan

func (c *CacheClientProcess) Scan(key string, action func(context.Context, string) error) error

func (*CacheClientProcess) Set

func (c *CacheClientProcess) Set(key string, value interface{}, exp time.Duration) error

type CacheClientS3

type CacheClientS3 struct {
	MC     *minio.Client
	Bucket string
	CTX    context.Context
}

CacheClientS3 is a small cache that is backed by an S3-compatible store

func (*CacheClientS3) Del

func (c *CacheClientS3) Del(key string) error

func (*CacheClientS3) Get

func (c *CacheClientS3) Get(key string) (string, error)

Get returns an object, it follows the original pattern in larry to return redis.Nil when an object does not exist, in other case we can use minio.ToErrorResponse(err) to extract more details about the potential S3 related error

func (*CacheClientS3) Scan

func (c *CacheClientS3) Scan(key string, action func(context.Context, string) error) error

func (*CacheClientS3) Set

func (c *CacheClientS3) Set(key string, value interface{}, exp time.Duration) error

Jump to

Keyboard shortcuts

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