blobscache

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCacheNotFound = errors.New("blob not found in cache")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	PutBlob(ctx context.Context, key string, blob []byte) error
	GetBlob(ctx context.Context, key string) ([]byte, error)
}

func NewMockBlobsCacheClient

func NewMockBlobsCacheClient() Client

func NewRemoteBlobsCache

func NewRemoteBlobsCache(url string) Client

type GetBlobRequest

type GetBlobRequest struct {
	Key string `json:"key"`
}

type GetBlobResponse

type GetBlobResponse struct {
	Blob json.RawMessage `json:"blob"`
}

type PubBlobRequest

type PubBlobRequest struct {
	Key  string          `json:"key"`
	Blob json.RawMessage `json:"blob"`
}

type Server

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

func NewBlobsCacheServer

func NewBlobsCacheServer(log logrus.FieldLogger, cfg ServerConfig) *Server

func (*Server) Start

func (s *Server) Start(ctx context.Context)

type ServerConfig

type ServerConfig struct {
	ServePort int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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