ISetter

Interface for data processing components that can set (create or update) data items.

Description

The ISetter[T any, K any] interface is used by data processing components that can set (create or update) data items.

  • T any type
  • K any type of id (key)

Methods

Set

Sets a data item. If the data item exists it updates it, otherwise it creates a new data item.

Set(ctx context.Context, context IContext, item T) (value T, err error)

  • context: IContext - (optional) a context to trace execution through a call chain.
  • item: T - item to be set.
  • returns: (value T, err error) - updated item