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>>, }

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

impl<T: Clone> Clone for EventsOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
[src]

impl<T: Debug> Debug for EventsOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
[src]

impl<T: Default> Default for EventsOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
[src]

impl<T> Serialize for EventsOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for EventsOptions<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for EventsOptions<T> where
    T: Send
[src]

impl<T> Sync for EventsOptions<T> where
    T: Sync
[src]

impl<T> Unpin for EventsOptions<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for EventsOptions<T> where
    T: UnwindSafe
[src]

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> From<T> for T[src]

impl<T> Instrument 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.