common

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProxyOversizedBlob = fmt.Errorf("encoded blob is larger than max blob size")
)

Functions

func Contains added in v1.6.0

func Contains[P comparable](s []P, e P) bool

func ContainsDuplicates added in v1.6.0

func ContainsDuplicates[P comparable](s []P) bool

func ParseBytesAmount

func ParseBytesAmount(s string) (uint64, error)

Types

type BackendType added in v1.6.0

type BackendType uint8

BackendType ... Storage backend type

const (
	EigenDABackendType BackendType = iota
	MemoryBackendType
	S3BackendType
	RedisBackendType

	UnknownBackendType
)

func StringToBackendType added in v1.6.0

func StringToBackendType(s string) BackendType

func (BackendType) String added in v1.6.0

func (b BackendType) String() string

type GeneratedKeyStore added in v1.6.0

type GeneratedKeyStore interface {
	Store
	// Get retrieves the given key if it's present in the key-value data store.
	Get(ctx context.Context, key []byte) ([]byte, error)
	// Put inserts the given value into the key-value data store.
	Put(ctx context.Context, value []byte) (key []byte, err error)
}

type PrecomputedKeyStore added in v1.6.0

type PrecomputedKeyStore interface {
	Store
	// Get retrieves the given key if it's present in the key-value data store.
	Get(ctx context.Context, key []byte) ([]byte, error)
	// Put inserts the given value into the key-value data store.
	Put(ctx context.Context, key []byte, value []byte) error
}

type Store added in v1.6.0

type Store interface {
	// Backend returns the backend type provider of the store.
	BackendType() BackendType
	// Verify verifies the given key-value pair.
	Verify(ctx context.Context, key []byte, value []byte) error
}

Jump to

Keyboard shortcuts

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