certmagicrados

package module
v0.0.0-...-5edf2c3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 11 Imported by: 0

README

certmagic-rados-storage

This package implements certmagic's Storage interface using the Ceph RADOS distributed object store.

Acknowledgements

Thanks to @DisposaBoy for the initiative to establish a test suite and their efforts in clarifying the Storage API. See caddyserver/certmagic#58 and oyato/certmagic-storage-tests.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage implements certmagic.Storage using Ceph's RADOS object store.

func NewStorage

func NewStorage(ioctx *rados.IOContext, oid string, opts ...StorageOption) *Storage

func (*Storage) Delete

func (s *Storage) Delete(key string) error

func (*Storage) Exists

func (s *Storage) Exists(key string) bool

func (*Storage) List

func (s *Storage) List(prefix string, recursive bool) ([]string, error)

func (*Storage) Load

func (s *Storage) Load(key string) ([]byte, error)

func (*Storage) Lock

func (s *Storage) Lock(ctx context.Context, key string) error

func (*Storage) Stat

func (s *Storage) Stat(key string) (certmagic.KeyInfo, error)

func (*Storage) Store

func (s *Storage) Store(key string, value []byte) error

func (*Storage) Unlock

func (s *Storage) Unlock(key string) error

type StorageOption

type StorageOption func(*Storage)

A StorageOption may be passed to NewStorage to customize the Storage's behaviour.

func WithLockTimeout

func WithLockTimeout(d time.Duration) StorageOption

WithLockTimeout sets up RADOS locks to expire after d has passed.

func WithLogger

func WithLogger(l *zap.Logger) StorageOption

Notes

Bugs

  • grow backoff duration with number of retries!

Jump to

Keyboard shortcuts

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