This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def find_nested_object_property_schema(schema, property_name) | |
| @logger.debug "Starting search for nested property '#{property_name}'" | |
| @logger.debug "Starting schema: #{JSON.dump(get_reduced_schema(schema))}" | |
| # See if we're checking an object schema directly. | |
| if !schema['properties'].nil? | |
| @logger.debug "Schema is object, checking properties directly." | |
| return schema['properties'][property_name] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ghcr.io/goauthentik/server:2022.9.0 | |
| USER root | |
| RUN sed -i -e 's# > /dev/stderr##g' /lifecycle/ak | |
| USER authentik | |
| ENTRYPOINT ["/lifecycle/ak"] | |
| CMD ["server"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| version: '3.4' | |
| services: | |
| postgresql: | |
| image: docker.io/library/postgres:12-alpine | |
| restart: unless-stopped | |
| network_mode: host | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "description": "A complete Vector configuration.", | |
| "$ref": "#/definitions/vector::config::builder::ConfigBuilder", | |
| "definitions": { | |
| "vector::config::builder::ConfigBuilder": { | |
| "description": "A complete Vector configuration.", | |
| "allOf": [ | |
| { | |
| "type": "object", | |
| "properties": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apm_config: | |
| # This points the `trace-agent` at Vector's `datadog_agent` source. | |
| apm_dd_url: http://localhost:8081 | |
| # Set these to zero in order to avoid the Datadog Agent sampling traces before sending | |
| # them to Vector, which will skew computed statistics like request count, or success vs | |
| # error span count, etc. | |
| max_traces_per_second: 0 | |
| errors_per_second: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Our entrypoint for initializing logging via `tracing`. | |
| pub fn initialize_logging(levels: &str) { | |
| // Here, `levels` is "vector=info,codec=info,vrl=info,file_source=info,tower_limit=trace,rdkafka=info,buffers=info,kube=info". | |
| let fmt_filter = tracing_subscriber::filter::Targets::from_str(levels).expect( | |
| "logging filter targets were not formatted correctly or did not specify a valid level", | |
| ); | |
| // `MetricsLayer` impls `tracing_subscriber::layer::Layer` so this ends up being `Option<Filtered<MetricsLayer, ...>>`. | |
| let metrics_layer = metrics_layer_enabled() | |
| .then(|| MetricsLayer::new().with_filter(tracing_subscriber::filter::LevelFilter::INFO)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// A period of time. | |
| #[derive(Clone, Serialize, Deserialize)] | |
| pub struct SpecialDuration(u64); | |
| /// Controls the batching behavior of events. | |
| #[derive(Clone)] | |
| #[configurable_component] | |
| pub struct BatchConfig { | |
| /// The maximum number of events in a batch before it is flushed. | |
| max_events: Option<u64>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[configurable(type = "sink")] | |
| pub struct BasicStruct { | |
| foo: String, | |
| } | |
| const _: () = { | |
| #[automatically_derived] | |
| impl<'configurable> ::vector_config::Configurable<'configurable> for BasicStruct { | |
| fn shape() -> ::vector_config::Shape { | |
| ::vector_config::Shape::Boolean | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tracing = { version = "0.1.32", default-features = false } | |
| tracing-core = { version = "0.1.23", default-features = false } | |
| tracing-futures = { version = "0.2.5", default-features = false, features = ["futures-03"] } | |
| tracing-log = { version = "0.1.2", default-features = false, features = ["log-tracer", "std"] } | |
| tracing-subscriber = { version = "0.3.9", default-features = false, features = ["ansi", "env-filter", "fmt", "json", "registry"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::{time::Duration, marker::PhantomData}; | |
| use schemars::{JsonSchema, schema::{SchemaObject, InstanceType, SingleOrVec, NumberValidation, Schema}, gen::SchemaGenerator}; | |
| use serde::{Deserialize, Serialize, Serializer, Deserializer}; | |
| use serde_with::{SerializeAs, DeserializeAs, DurationSeconds, formats::Strict}; | |
| #[derive(Copy, Clone, Debug, Default)] | |
| pub struct AsSchema<T: ?Sized>(PhantomData<T>); | |
| impl<T: JsonSchema + ?Sized> AsSchema<T> { |