redisstorage

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Key = func(req *http.Request) string {
	return strings.TrimPrefix(req.URL.String(), "https://")
}

Key generates the Redis key from the URL.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Client     *redis.Client
	Expiration time.Duration
}

Storage implements the ghtransport.Storage interface backed by Redis.

func New

func New(client *redis.Client) *Storage

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, req *http.Request) (*http.Response, error)

func (*Storage) Put

func (s *Storage) Put(ctx context.Context, resp *http.Response) error

Jump to

Keyboard shortcuts

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