Documentation ¶
Index ¶
- func TopicMissingError(topic string) error
- func WithPersistenceIdSwitchPersistenceIdFunction(topic string, f PersistenceIdFunction[[]byte, []byte]) runtime.Configuration[*PersistenceIdSwitch]
- func WithTopicSwitchFunction(topic string, f SingleFunction) runtime.Configuration[*TopicSwitch]
- type ErrorHandlerFunction
- type OneToOneFunction
- type OneToTwoFunction
- type PersistenceIdFunction
- type PersistenceIdSwitch
- type Repository
- type SingleFunction
- func ConvertOneToOne[S any, IK any, IV any, OK any, OV any](source OneToOneFunction[S, IK, IV, OK, OV], s format.Format[S], ...) SingleFunction
- func ConvertOneToTwo[S any, IK any, IV any, OK1 any, OV1 any, OK2 any, OV2 any](source OneToTwoFunction[S, IK, IV, OK1, OV1, OK2, OV2], s format.Format[S], ...) SingleFunction
- func ConvertTopicOneToOne[S any, IK any, IV any, OK any, OV any](source OneToOneFunction[S, IK, IV, OK, OV], s format.Format[S], ...) SingleFunction
- func ConvertTopicOneToTwo[S any, IK any, IV any, OK1 any, OV1 any, OK2 any, OV2 any](source OneToTwoFunction[S, IK, IV, OK1, OV1, OK2, OV2], s format.Format[S], ...) SingleFunction
- func NewTopicSwitch(configurations ...runtime.Configuration[*TopicSwitch]) SingleFunction
- type State
- type TopicSwitch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TopicMissingError ¶
func WithPersistenceIdSwitchPersistenceIdFunction ¶
func WithPersistenceIdSwitchPersistenceIdFunction(topic string, f PersistenceIdFunction[[]byte, []byte]) runtime.Configuration[*PersistenceIdSwitch]
configuration
func WithTopicSwitchFunction ¶ added in v0.1.1
func WithTopicSwitchFunction(topic string, f SingleFunction) runtime.Configuration[*TopicSwitch]
configuration
Types ¶
type ErrorHandlerFunction ¶ added in v0.2.8
type OneToOneFunction ¶
type OneToTwoFunction ¶
type PersistenceIdFunction ¶
type PersistenceIdFunction[IK any, IV any] func(context.Context, flow.Message[IK, IV]) (string, error)
func ConvertPersistenceId ¶
func ConvertPersistenceId[IK any, IV any]( source PersistenceIdFunction[IK, IV], ik format.Format[IK], iv format.Format[IV], ) PersistenceIdFunction[[]byte, []byte]
func NewPersistenceIdSwitch ¶ added in v0.1.1
func NewPersistenceIdSwitch(configurations ...runtime.Configuration[*PersistenceIdSwitch]) PersistenceIdFunction[[]byte, []byte]
constructor
type PersistenceIdSwitch ¶
type PersistenceIdSwitch struct {
// contains filtered or unexported fields
}
implementation
type Repository ¶ added in v0.1.1
type Repository interface { Get(ctx context.Context, persistenceId string) (State[structure.Bytes], error) GetAll(ctx context.Context, persistenceId []string) (map[string]State[structure.Bytes], error) Upsert(ctx context.Context, persistenceId string, dbState State[structure.Bytes]) error UpsertAll(ctx context.Context, stateMap map[string]State[structure.Bytes]) error }
type SingleFunction ¶
type SingleFunction func(context.Context, flow.Message[structure.Bytes, structure.Bytes], State[structure.Bytes]) ([]flow.Message[structure.Bytes, structure.Bytes], State[structure.Bytes], error)
func ConvertOneToOne ¶
func ConvertOneToTwo ¶
func ConvertOneToTwo[S any, IK any, IV any, OK1 any, OV1 any, OK2 any, OV2 any]( source OneToTwoFunction[S, IK, IV, OK1, OV1, OK2, OV2], s format.Format[S], ik format.Format[IK], iv format.Format[IV], ok1 format.Format[OK1], ov1 format.Format[OV1], ok2 format.Format[OK2], ov2 format.Format[OV2], ) SingleFunction
func ConvertTopicOneToOne ¶ added in v0.0.15
func ConvertTopicOneToTwo ¶ added in v0.0.15
func NewTopicSwitch ¶ added in v0.1.1
func NewTopicSwitch(configurations ...runtime.Configuration[*TopicSwitch]) SingleFunction
constructor
type State ¶ added in v0.1.1
type State[S any] struct { Id string Internal *protobuf.State Results *protobuf.Results Content S CreatedTimestampMs int64 UpdatedTimestampMs int64 }
func ConvertSingleState ¶
func ConvertSingleState[V1 any, V2 any]( source State[V1], v1 format.Format[V1], v2 format.Format[V2], ) (State[V2], error)
assuming byte compatibility, i.e. bytes <-> proto, string <-> json
func SetDefault ¶
type TopicSwitch ¶ added in v0.1.1
type TopicSwitch struct {
// contains filtered or unexported fields
}
implementation
Source Files ¶
Click to show internal directories.
Click to hide internal directories.