MessageState overview
Added in v1.0.0
Table of contents
constructors
Acknowledged
Constructs an AcknowledgedMessageState.
Signature
export declare const Acknowledged: MessageStateAcknowledged
Added in v1.0.0
Processed
Constructs a ProcessedMessageState from the result of the message being processed.
Signature
export declare const Processed: <A>(result: A) => MessageStateProcessed<A>
Added in v1.0.0
models
MessageState (type alias)
Once a Message is sent to an entity to be processed, the state of that message over that entity is either Acknoledged (not yet processed) or Processed.
Signature
export type MessageState<A> = MessageStateAcknowledged | MessageStateProcessed<A>
Added in v1.0.0
MessageState (namespace)
Added in v1.0.0
Encoded (type alias)
Signature
export type Encoded<I> =
| {
readonly "@effect/cluster/MessageState": "@effect/cluster/MessageState"
readonly _tag: "@effect/cluster/MessageState/Acknowledged"
}
| {
readonly result: I
readonly "@effect/cluster/MessageState": "@effect/cluster/MessageState"
readonly _tag: "@effect/cluster/MessageState/Processed"
}
Added in v1.0.0
MessageStateAcknowledged (interface)
A message state given to just acknowledged messages. This state tells the sender that the receiver has received the message and will eventually process it later.
Signature
export interface MessageStateAcknowledged {
readonly [MessageStateTypeId]: MessageStateTypeId
readonly _tag: "@effect/cluster/MessageState/Acknowledged"
}
Added in v1.0.0
MessageStateProcessed (interface)
A message state given to processed messages. This state tells the sender that the receiver has already received and processed the message. This will also tell the sender the result for this message.
Signature
export interface MessageStateProcessed<A> {
readonly [MessageStateTypeId]: MessageStateTypeId
readonly _tag: "@effect/cluster/MessageState/Processed"
readonly result: A
}
Added in v1.0.0
schema
schema
Signature
export declare const schema: <A, I>(
result: Schema.Schema<A, I>
) => Schema.Schema<MessageState<A>, MessageState.Encoded<I>>
Added in v1.0.0
symbols
MessageStateTypeId
Signature
export declare const MessageStateTypeId: typeof MessageStateTypeId
Added in v1.0.0
MessageStateTypeId (type alias)
Signature
export type MessageStateTypeId = typeof MessageStateTypeId
Added in v1.0.0
utils
isMessageState
Ensures that the given value is a MessageState
Signature
export declare const isMessageState: typeof internal.isMessageState
Added in v1.0.0
mapEffect
Effectfully transform the type of the MessageState.
Signature
export declare const mapEffect: <A, B, R, E>(
value: MessageState<A>,
fn: (value: A) => Effect.Effect<B, E, R>
) => Effect.Effect<MessageState<B>, E, R>
Added in v1.0.0
match
Match over the possible states of a MessageState
Signature
export declare const match: typeof internal.match
Added in v1.0.0