cachekey

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidBucketCacheKeyFormat = errors.New("key has invalid format")
	ErrInvalidBucketCacheKeyVerb   = errors.New("key has invalid verb")
	ErrParseKeyInt                 = errors.New("failed to parse integer in key")
)

Functions

func IsValidVerb

func IsValidVerb(v VerbType) bool

IsValidVerb checks if the VerbType matches the predefined verbs.

Types

type BucketCacheKey

type BucketCacheKey struct {
	Verb                    VerbType
	Name                    string
	Start                   int64
	End                     int64
	ObjectStorageConfigHash string
}

func ParseBucketCacheKey

func ParseBucketCacheKey(key string) (BucketCacheKey, error)

ParseBucketCacheKey parses a string and returns BucketCacheKey.

func (BucketCacheKey) String

func (ck BucketCacheKey) String() string

String returns the string representation of BucketCacheKey.

type VerbType

type VerbType string

VerbType is the type of operation whose result has been stored in the caching bucket's cache.

const (
	ExistsVerb        VerbType = "exists"
	ContentVerb       VerbType = "content"
	IterVerb          VerbType = "iter"
	IterRecursiveVerb VerbType = "iter-recursive"
	AttributesVerb    VerbType = "attrs"
	SubrangeVerb      VerbType = "subrange"
)

Jump to

Keyboard shortcuts

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