Struct bollard::system::EventsOptions[][src]

pub struct EventsOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
{ pub since: Option<DateTime<Utc>>, pub until: Option<DateTime<Utc>>, pub filters: HashMap<T, Vec<T>>, }
Expand description

Parameters used in the Events API

Examples

use bollard::system::EventsOptions;
use chrono::{Duration, Utc};
use std::collections::HashMap;

EventsOptions::<String>{
    since: Some(Utc::now() - Duration::minutes(20)),
    until: Some(Utc::now()),
    filters: HashMap::new()
};

Fields

since: Option<DateTime<Utc>>

Show events created since this timestamp then stream new events.

until: Option<DateTime<Utc>>

Show events created until this timestamp then stop streaming.

filters: HashMap<T, Vec<T>>

A JSON encoded value of filters (a map[string][]string) to process on the event list. Available filters:

  • config=<string> config name or ID
  • container=<string> container name or ID
  • daemon=<string> daemon name or ID
  • event=<string> event type
  • image=<string> image name or ID
  • label=<string> image or container label
  • network=<string> network name or ID
  • node=<string> node ID
  • plugin= plugin name or ID
  • scope= local or swarm
  • secret=<string> secret name or ID
  • service=<string> service name or ID
  • type=<string> object to filter by, one of container, image, volume, network, daemon, plugin, node, service, secret or config
  • volume=<string> volume name

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more