processor

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor[V any] struct {
	Logger zerolog.Logger
	// contains filtered or unexported fields
}

func New

func New[V any](
	localStorage local_kv_pairs.Repository[V],
	merger model.Merger[V],
	remoteStorage remote_kv_pairs.Gateway[V],
	hostname string,
	weight uint,
	discovery model.Discovery,
	hashFunc hashringx.HashFunc,
	replicas uint8,
	revertTimeout time.Duration,
	logger zerolog.Logger,
) *Processor[V]

func (*Processor[V]) AddOrUpdate

func (pr *Processor[V]) AddOrUpdate(ctx context.Context, key string, value V, processedOn []string) (resErr error)

func (*Processor[V]) Get

func (pr *Processor[V]) Get(ctx context.Context, key string) (model.KVPair[V], error)

func (*Processor[V]) Metrics

func (pr *Processor[V]) Metrics() []prometheus.Collector

func (*Processor[V]) Remove

func (pr *Processor[V]) Remove(ctx context.Context, key string, processedOn []string) (resErr error)

func (*Processor[V]) Start

func (pr *Processor[V]) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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