storage

package
v2.2.9 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package storage contains the storage processor which allows to concurrently store the processed data in a storage system.

Index

Constants

View Source
const Name = "storage"

Name of the processor.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage[In any] struct {
	processor.IProcessor[In] `json:"processor" validate:"required"`
}

Storage definition.

func Must

func Must[In any](
	s storage.IStorage,
	concurrency int,
	idPrefix string,
	opts ...processor.Func[In],
) *Storage[In]

Must returns a new processor or panics if an error occurs.

func New

func New[In any](
	s storage.IStorage,
	concurrency int,
	idPrefix string,
	opts ...processor.Func[In],
) (*Storage[In], error)

New creates a new Storage processor.

NOTE: Mininum concurrency is 1. NOTE: idPrefix example: "news-"

Jump to

Keyboard shortcuts

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