[][src]Struct nakadi_types::model::event_type::EventType

pub struct EventType {
    pub name: EventTypeName,
    pub owning_application: Option<OwningApplication>,
    pub category: Category,
    pub enrichment_strategies: Vec<EnrichmentStrategy>,
    pub partition_strategy: Option<PartitionStrategy>,
    pub compatibility_mode: Option<CompatibilityMode>,
    pub schema: EventTypeSchema,
    pub partition_key_fields: PartitionKeyFields,
    pub cleanup_policy: Option<CleanupPolicy>,
    pub default_statistic: Option<EventTypeStatistics>,
    pub options: EventTypeOptions,
    pub authorization: Option<EventTypeAuthorization>,
    pub audience: Option<EventTypeAudience>,
    pub ordering_key_fields: Vec<String>,
    pub ordering_instance_ids: Vec<String>,
    pub created_at: DateTime<Utc>,
    pub updated_at: DateTime<Utc>,
}

Definition of an event type

This struct is only used for querying from Nakadi.

See also Nakadi Manual

Fields

name: EventTypeName

Name of this EventType. The name is constrained by a regular expression.

Note: the name can encode the owner/responsible for this EventType and ideally should follow a common pattern that makes it easy to read and understand, but this level of structure is not enforced. For example a team name and data type can be used such as ‘acme-team.price-change’.

owning_application: Option<OwningApplication>

Indicator of the application owning this EventType.

category: Category

Defines the category of this EventType.

The value set will influence, if not set otherwise, the default set of validations, enrichment-strategies, and the effective schema for validation.

enrichment_strategies: Vec<EnrichmentStrategy>

Determines the enrichment to be performed on an Event upon reception. Enrichment is performed once upon reception (and after validation) of an Event and is only possible on fields that are not defined on the incoming Event.

For event types in categories ‘business’ or ‘data’ it’s mandatory to use metadata_enrichment strategy. For ‘undefined’ event types it’s not possible to use this strategy, since metadata field is not required.

See documentation for the write operation for details on behaviour in case of unsuccessful enrichment.

partition_strategy: Option<PartitionStrategy>

Determines how the assignment of the event to a partition should be handled.

compatibility_mode: Option<CompatibilityMode>

Compatibility mode provides a mean for event owners to evolve their schema, given changes respect the semantics defined by this field.

It’s designed to be flexible enough so that producers can evolve their schemas while not inadvertently breaking existent consumers.

Once defined, the compatibility mode is fixed, since otherwise it would break a predefined contract, declared by the producer.

schema: EventTypeSchemapartition_key_fields: PartitionKeyFields

Required when ‘partition_resolution_strategy’ is set to ‘hash’. Must be absent otherwise. Indicates the fields used for evaluation the partition of Events of this type.

If this is set it MUST be a valid required field as defined in the schema.

cleanup_policy: Option<CleanupPolicy>

Event type cleanup policy. There are two possible values:

default_statistic: Option<EventTypeStatistics>options: EventTypeOptionsauthorization: Option<EventTypeAuthorization>audience: Option<EventTypeAudience>ordering_key_fields: Vec<String>

This is only an informational field. The events are delivered to consumers in the order they were published. No reordering is done by Nakadi.

This field is useful in case the producer wants to communicate the complete order accross all the events published to all partitions. This is the case when there is an incremental generator on the producer side, for example.

It differs from partition_key_fields in the sense that it’s not used for partitioning (known as sharding in some systems). The order indicated by ordering_key_fields can also differ from the order the events are in each partition, in case of out-of-order submission.

In most cases, this would have just a single item (the path of the field by which this is to be ordered), but can have multiple items, in which case those are considered as a compound key, with lexicographic ordering (first item is most significant).

ordering_instance_ids: Vec<String>created_at: DateTime<Utc>

Date and time when this event type was created.

updated_at: DateTime<Utc>

Date and time when this event type was updated.

Trait Implementations

impl Clone for EventType[src]

impl Debug for EventType[src]

impl<'de> Deserialize<'de> for EventType[src]

impl Serialize for EventType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,