Changeset View
Changeset View
Standalone View
Standalone View
services/tunnelbroker/src/database/mod.rs
- This file was moved from services/tunnelbroker/src/database.rs.
Show All 9 Lines | |||||
use std::sync::Arc; | use std::sync::Arc; | ||||
use std::time::{SystemTime, UNIX_EPOCH}; | use std::time::{SystemTime, UNIX_EPOCH}; | ||||
use tracing::{debug, error}; | use tracing::{debug, error}; | ||||
use crate::constants::dynamodb::undelivered_messages::{ | use crate::constants::dynamodb::undelivered_messages::{ | ||||
PARTITION_KEY, PAYLOAD, SORT_KEY, TABLE_NAME, | PARTITION_KEY, PAYLOAD, SORT_KEY, TABLE_NAME, | ||||
}; | }; | ||||
pub mod message; | |||||
pub use message::*; | |||||
#[derive(Clone)] | #[derive(Clone)] | ||||
pub struct DatabaseClient { | pub struct DatabaseClient { | ||||
client: Arc<Client>, | client: Arc<Client>, | ||||
} | } | ||||
pub fn unix_timestamp() -> u64 { | pub fn unix_timestamp() -> u64 { | ||||
SystemTime::now() | SystemTime::now() | ||||
.duration_since(UNIX_EPOCH) | .duration_since(UNIX_EPOCH) | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |