storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExists = errors.New("attr exists")
)

Functions

func WithBus

func WithLogger

func WithLogger(logger logger.Interface) pkgOptions.Option[Options]

func WithNKey added in v0.1.1

func WithNKey(nkey nkeys.KeyPair) pkgOptions.Option[Options]

Types

type Interface

type Interface interface {
	Start() error
	Stop() error

	KeyExists(resource string, namespace string, key string) (bool, error)
	KeyList(resource string, namespace string) []string

	AttrList(resource string, namespace string, key string) []string
	AttrExists(resource string, namespace string, attr string, key string) (bool, error)
	BlobExists(resource string, namespace string, attr string, key string) (bool, error)

	AttrSet(resource string, namespace string, attr string, key string, value []byte, replace bool) error
	AttrGet(resource string, namespace string, attr string, key string) ([]byte, error)

	BlobWrite(resource string, namespace string, attr string, key string, data io.ReadCloser, replace bool) error
	BlobRead(resource string, namespace string, attr string, key string) (io.ReadCloser, error)

	AttrDelete(resource string, namespace string, attr string, key string) error

	AttrWatch(resource string, namespace string, attr string, callback WatchCallbackFunc) (WatchStopFunc, error)
}

func New

func New(opt ...pkgOptions.Option[Options]) (Interface, error)

type Options added in v0.1.1

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

type WatchCallbackFunc

type WatchCallbackFunc = func(resource string, namespace string, attr string, key string, data []byte, prevData []byte, delete bool)

type WatchStopFunc

type WatchStopFunc = func() error

type WriteData

type WriteData struct {
}

Source Files

  • error.go
  • event.go
  • impl.go
  • main.go
  • options.go

Jump to

Keyboard shortcuts

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