Skip to content

Commit 0d2cab5

Browse files
Auto merge of #608 - lennart/CLOUD-150, r=TroyKomodo,philipch07
feat(ingest): ingest scaffolding This PR adds all the boilerplate for the ingest service. This doesn't implement anything. CLOUD-150 Requested-by: lennartkloock <[email protected]> Reviewed-by: TroyKomodo <[email protected]> Reviewed-by: philipch07 <[email protected]>
2 parents b385ecd + a21f1b7 commit 0d2cab5

File tree

18 files changed

+374
-0
lines changed

18 files changed

+374
-0
lines changed

Cargo.lock

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ members = [
1111
"cloud/geo-ip",
1212
"cloud/id",
1313
"cloud/proto",
14+
"cloud/video/ingest",
1415
"crates/aac",
1516
"crates/amf0",
1617
"crates/av1",

Justfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ run bin *args:
4343
bazel run //cloud/core:bin -- {{ args }}
4444
elif [ {{ bin }} == "email" ]; then
4545
bazel run //cloud/email:bin -- {{ args }}
46+
elif [ {{ bin }} == "ingest" ]; then
47+
bazel run //cloud/video/ingest:bin -- {{ args }}
4648
else
4749
echo "Unknown binary: {{ bin }}"
4850
exit 1

cargo_targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _packages = [
88
"//cloud/email",
99
"//cloud/email/traits",
1010
"//cloud/geo-ip",
11+
"//cloud/video/ingest",
1112
"//cloud/id",
1213
"//cloud/proto",
1314
"//crates/aac",

cloud/video/BUILD.bazel

Whitespace-only changes.

cloud/video/ingest/BUILD.bazel

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
load("//misc/utils/rust:manifest.bzl", "cargo_toml")
2+
load("//misc/utils/rust:package.bzl", "scuffle_package")
3+
4+
cargo_toml()
5+
6+
deps = [
7+
"//crates/bootstrap",
8+
"//crates/bootstrap-telemetry",
9+
"//crates/context",
10+
"//crates/settings",
11+
"//crates/signal",
12+
"//cloud/video/ingest/traits",
13+
]
14+
15+
aliases = {
16+
"//cloud/video/ingest/traits": "ingest_traits",
17+
}
18+
19+
scuffle_package(
20+
aliases = aliases,
21+
crate_name = "scufflecloud-ingest",
22+
deps = deps,
23+
)
24+
25+
scuffle_package(
26+
name = "bin",
27+
srcs = glob([
28+
"bin/standalone/**/*.rs",
29+
]),
30+
aliases = aliases,
31+
crate_name = "scufflecloud-ingest-standalone",
32+
crate_type = "bin",
33+
readme = False,
34+
deps = deps + [":ingest"],
35+
)

cloud/video/ingest/Cargo.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[package]
2+
name = "scufflecloud-ingest"
3+
version = "0.1.0"
4+
authors = ["Scuffle <[email protected]>"]
5+
edition = "2024"
6+
license = "AGPL-3.0"
7+
publish = false
8+
readme = "README.md"
9+
repository = "https://github.com/scufflecloud/scuffle"
10+
description = "Video ingest server for scuffle.cloud"
11+
12+
[[bin]]
13+
name = "scufflecloud-ingest-standalone"
14+
path = "bin/standalone/main.rs"
15+
16+
[lints.rust]
17+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
18+
19+
[dependencies]
20+
anyhow = "1.0.98"
21+
ingest-traits = { path = "./traits", package = "scufflecloud-ingest-traits" }
22+
scuffle-bootstrap = { path = "../../../crates/bootstrap" }
23+
scuffle-bootstrap-telemetry = { features = ["opentelemetry-logs", "opentelemetry-traces"], path = "../../../crates/bootstrap-telemetry" }
24+
scuffle-context = { path = "../../../crates/context" }
25+
scuffle-settings = { features = ["all-formats", "bootstrap"], path = "../../../crates/settings" }
26+
scuffle-signal = { features = ["bootstrap"], path = "../../../crates/signal" }
27+
serde = "1.0.219"
28+
serde_derive = "1.0.219"
29+
smart-default = "0.7.1"
30+
tracing = "0.1.41"
31+
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
32+
33+
[package.metadata.sync-readme.badges]
34+
docs-rs = false
35+
crates-io = false
36+
license = true
37+
codecov = true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../LICENSE.AGPL-3.0

cloud/video/ingest/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- dprint-ignore-file -->
2+
<!-- sync-readme title [[ -->
3+
# scufflecloud-ingest
4+
<!-- sync-readme ]] -->
5+
6+
<!-- sync-readme badge [[ -->
7+
![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-purple.svg?style=flat-square)
8+
[![Codecov](https://img.shields.io/codecov/c/github/scufflecloud/scuffle.svg?label=codecov&logo=codecov&style=flat-square)](https://app.codecov.io/gh/scufflecloud/scuffle)
9+
<!-- sync-readme ]] -->
10+
11+
---
12+
13+
<!-- sync-readme rustdoc [[ -->
14+
Video ingest server for <https://scuffle.cloud/>.
15+
16+
### License
17+
18+
This project is licensed under the [AGPL-3.0](./LICENSE.AGPL-3.0).
19+
20+
`SPDX-License-Identifier: AGPL-3.0`
21+
<!-- sync-readme ]] -->
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
use std::net::SocketAddr;
2+
3+
#[derive(serde_derive::Deserialize, smart_default::SmartDefault, Debug, Clone)]
4+
#[serde(default)]
5+
pub(crate) struct Config {
6+
#[default(env!("CARGO_PKG_NAME").to_string())]
7+
pub service_name: String,
8+
#[default = "info"]
9+
pub level: String,
10+
pub telemetry: Option<TelemetryConfig>,
11+
}
12+
13+
scuffle_settings::bootstrap!(Config);
14+
15+
#[derive(serde_derive::Deserialize, smart_default::SmartDefault, Debug, Clone)]
16+
pub(crate) struct TelemetryConfig {
17+
#[default("[::1]:4317".parse().unwrap())]
18+
pub bind: SocketAddr,
19+
}

0 commit comments

Comments
 (0)